Sunday, November 22, 2009

Airspace KML files updated for the December 17 cycle

I updated the airspace KML files again -- skipping one release. The latest covers from December 17, 2009 throughFebruary 11, 2010. You can find them in the archive here.

Friday, November 20, 2009

Migrating Movable Type and Gallery2 to a new (Fedora) server

I loved my Dell 1750 server. It has plenty of power and a great 3Ware RAID card, two 500 GB RAID-1 drives, 4 GB RAM, and ran Red Hat Linux. I bought it from the Dell Outlet site several years ago when my condo fee included electric. Since then I have moved. I pay my own electric bill, and my 1750 consumes 150 watts at idle. When I publish with Movable Type or Gallery, power consumption exceeds 200 watts. I pay $0.150845894 per kilowatt-hour. (That's summing the separate generation, transmission, distribution, demand-side surcharge, and adding the gross-receipts tax. Pepco doens't make it easy to figure out what you're paying.) With a thirty-day month, that's 108 kwh, which comes to $16.29135658. That's $16/month, just for idling. And that doesn't use the noise of the server in my office or the additional AC required in summer.


That may seem expensive, but it's far cheaper than getting that much server capacity at Rackspace. However, I don't need that much capacity. I can trade processor power for power savings, keep the disk space and RAID card, and switch to an Atom-based server. My current FreePBX Atom server runs at 40 watts with an analog card powering two FXS modules. I bet I can match that on a new server. I'd get the new Supermicro Atom Server, but it has space for only one 3.5 inch hard drive. I need two. Thus I'll be using another miniITX case. In the meantime, everything's running on another old Dell tower box.


How did I move it? First I though reinstalling all the software from scratch would be a good idea. I'd get a nice clean, efficient build. But that took way too long, and I'd have to re-customize my templates and tweaks. I had MySQL backups running for a while, why not start testing the restores? I used rsync:

rsync -avz /var/www/ -e ssh:user@mynewserver /var/www/


(Note: Please study rsync syntax. Those / at the ends make a big difference.)
It worked. Next I had to tweak the new httpd.conf file. I couldn't just copy the old one, because I was using the latest Apache version. But I could use almost all of the old file. I just needed to adjust the modules it loaded, because several have changed names.


Then I restored the databases:

mysql -u root -p


enter your password. (You ARE using a PW for MySQL root, aren't you?)

mysql> create database mynewdb


then

mysql> quit;


then

$ mysql -u root -p [mynewdb] < [backupfile.sql]



But that generally does not restore your user privs on the db. Back to mysql:

mysql -u root -p


then

mysql> use mynewdb;
mysql> GRANT ALL PRIVILEGES ON *.* TO 'myuser'@'localhost'
IDENTIFIED BY 'pAssW0rd' WITH GRANT OPTION;
mysql> flush privileges;


Don't forget the above step or you'll need to restart MySQL to get it to work.
mysql> quit;



Then double check that the user and pass from above match your config files.


Finally, test your applications. Gallery2 and MovableType worked fine. Your milage may vary. My office is almost silent now.