Greg Aker

Entries Tagged with: sysadmin

Logs are such a pain

Filed in: sysadmin

May 20, 2011

Most sysadmins I know really dislike two things. Logs and email. They are both a total pain. I didn't realize it tonight, but the default for Ubuntu is to keep a years worth of Nginx logs. If you have a busy site, your logs are going to get out of control very quickly.

So on Ubuntu 10.04 LTS, the default in /etc/logrotate.d/nginx is:

/var/log/nginx/*.log {
    rotate 52
    create 640 root adm
        [ ! -f /var/run/ ] || kill -USR1 `cat /var/run/`

While doing ...

Read More

My Development Setup

Filed in: sysadmin, web-dev

March 16, 2011

After about two+ years of tinkering and experimenting, I'm finally at peace with my development setup. While it wasn't as painful as my quest to find my favorite tenor saxophone mouthpiece, (a hard rubber Otto Link Slant Sig 7* from the 70s, if you care) it was still a long process.

Early on, I used WAMP then moved to Ubuntu and got everything I need from Aptitude. Then I got a Mac and started using MAMP again. I then got sick of the MAMP icon in my dock, so I started using a headless Ubuntu VM in VMware ...

Read More

Migrating Simple Desktops and Making it Rule - Part 1

Project Layout & Nginx

Filed in: Python, sysadmin

December 1, 2010

I worked with Kenny Meyers to move the kick-ass Simple Desktops website over to a new VPS and front static assets on EngineHosting's CDN. Kenny did the Django programming and it was a fun learning experience for us, as we moved from MySQL to Postgres and deployed with Chef, Gunicorn, Nginx and Fabric.

  1. Project Layout & Nginx
  2. Gunicorn & Supervisor
  3. Fabric
  4. Migrating from MySQL to Postgres

Project Layout

I had Kenny shuffle the project directory layout just a bit, we added the project specific configuration files in the config dir, pip requirements to the dependencies.txt file and application source files ...

Read More

Find ExpressionEngine versions with find

Filed in: sysadmin, ExpressionEngine

November 30, 2010

Do you manage a bunch of ExpressionEngine installs on the same server? Wanna see what versions they are all running? It's easy with find.

$ find . -name 'config.php' -print0 | xargs -0 grep 'app_version'

This will give you a path to the config file so you know what installation you're working with. :)

Yay for cli-foo!

Read More

Knowing the 'top' command doesn't make you a sysadmin

But you should still know how to provision a server

Filed in: Web Stuff, Blobbing, sysadmin

November 16, 2010

By definition, designers and developers are not sysadmins. However, most good designers have a good idea as to what takes to be a good developer, and most developers I know (present company included) are usually pretty opinionated about design and have some idea how to design. Even if it's not at a professional level. So, following that logic, you have no excuse not being able to provision a server and be able to launch a website on it. Plesk, cPanel and/or your hosting control panel are not allowed. In fact, you should all be adept enough to realize ...

Read More

Are you running APC?

Filed in: sysadmin, Performance, PHP

October 13, 2010

Given the plethora of tutorials out there on how to run your own VPS, and the number of hosts offering DIY VPSs for super cheap, many developers find themselves becoming sys-admins. So securely configuring your stack, and tuning/configuring to offer optimal performance out of low resources is key. For these cases, I totally prefer Nginx, and I'm waffling on the proper way to configure PHP, whether it is proxying to Apache, or running php-cgi. The only thing no one can argue with is APC.

If you know, and talk with sysadmins, you'll quickly realize that most good ...

Read More