Category Archives: Systems Administration

When installing MySQL always set the sql-mode

As I’ve described before, MySQL has some appalling out of the box settings which will thwart your attempts at good data integrity! They’ve clearly seen the light though and at least give you an option to achieve good data integrity … Continue reading

Posted in MySQL, Systems Administration | 1 Comment

Running Ruby on Rails with Apache 2 and mod_fcgid

My hosted Linux server runs Debian Sarge 3.1 with Apache 2. As most Ruby users have heard Apache 2 is rumored to be problematic with FastCGI. This evening I’ve been working on putting up a new Ruby on Rails site … Continue reading

Posted in Ruby, Systems Administration | Leave a comment

Use env to ensure a script will work in cron

I’ve often written scripts only to discover once added to crontab that it relies on an environment setting such as having the java command in the PATH or having CVSROOT set. To avoid this I now run scripts I’m developing … Continue reading

Posted in Systems Administration | 1 Comment

Avoid hard-coding the path to the interpreter in your scripts

In general when trying to write portable scripts don’t start them with #!/bin/bash, instead start them with #!/usr/bin/env bash. The only caveat is that you DO NOT want to do this for critical security scripts because it opens you up … Continue reading

Posted in Ruby, Systems Administration | 4 Comments

Unix and Windows Sysadmin in downtown San Francisco

My buddy Mike at UrbanaSoft is looking for an experienced full-time Unix and Windows sysadmin in downtown San Francisco. Pay is between $80-$100k depending on experience plus benefits and all that good stuff. If you’re qualified and interested or know … Continue reading

Posted in Systems Administration | Leave a comment

Moving MySQL tables live with zero downtime

The biggest challege to moving large amounts of data into production with (almost) zero downtime with MySQL is that the old table will be dropped and the new table locked while you’re loading the data. If you try that while … Continue reading

Posted in Database, MySQL, Systems Administration | 2 Comments

Using log4j to monitor web application errors

When monitoring a production website (especially with a dozen or so application servers) you don’t want to rely on combining the logs and reviewing them manually for exceptions, you want the servers to notify you when there’s a problem. There … Continue reading

Posted in Java, Software Engineering, Systems Administration | 2 Comments

Disassembling the MacBook Pro

I had quite a scare today when my new MacBook Pro wouldn’t boot. It would turn on, the screen would go white, and after about 20 seconds it flashed a question mark in a box on the screen. I thought … Continue reading

Posted in Desktop, OSX, Systems Administration | 4 Comments

Issue and solution for upgrading Lighttpd from 1.4.8 to 1.4.11

After upgrading Lighttpd to 1.4.11 from 1.4.8 it was no longer working with my Ruby on Rails project saying it couldn’t find public/dispatch.fcgi. Well, it turns out they made this security fix which breaks relative paths typically used in lighttpd.conf:

Posted in Ruby, Systems Administration, Web | 7 Comments

Scaling a medium sized website

Eric Hodel posted their production website server setup over at the Robot Coop that handled 2.5M page views in a day not too long ago. I love this kind of information because it helps me get a feel for how … Continue reading

Posted in Systems Administration, Web | 1 Comment