Missing mail command on Amazon’s Linux

I recently noticed that the mail command is not available by default on the latest version of Amazon’s Linux AMI (v2011.09). This functionality is available in the mailx package, which can be installed with the following: yum install mailx

Building an Nginx RPM on Amazon’s Linux

If no customizations are desired, a far simpler way to get the RPM, than that outlined below, is to use the nginx repository, available from nginx’s download page. After deciding to change my server stack today (based on Amazon’s Linux), I noted that, despite the current version of Amazon’s Linux being hardly a few days… Continue reading Building an Nginx RPM on Amazon’s Linux

Upgrading Amazon’s Linux

Today, after looking over the changes in the new version of Amazon’s Linux AMI, I decided to upgrade (from 2011.02 to 2011.09). After running yum upgrade, I ran into an error (below) with compat-openldap. Error: Package: compat-openldap-2.4.19_2.3.43-15.11.amzn1.i686 (@upgrade-updates/2010.11) Requires: openldap = 2.4.19-15.11.amzn1 Removing: openldap-2.4.19-15.11.amzn1.i686 (@upgrade-updates/2010.11) openldap = 2.4.19-15.11.amzn1 Updated By: openldap-2.4.23-15.13.amzn1.i686 (amzn-main) openldap = 2.4.23-15.13.amzn1… Continue reading Upgrading Amazon’s Linux

Installing Heartbeat on Amazon’s EC2

I am currently working on setting up a small high availability server cluster on Amazon’s EC2 cloud. Such a setup requires several underlying technologies to work together. Common among these are a distributed file system, a load balancer, and some form of monitoring and resource control. This article looks at the one aspect of ‘monitoring’… Continue reading Installing Heartbeat on Amazon’s EC2

Rotating EBS Snapshots: ec2-prune-snapshots

Following the significant disruption of EBS volumes in April, the importance of backups was once again brought to the forefront. Amazon’s method of generating EBS backups is the ‘snapshot’ – a differential backup stored in S3. While Amazon provides tools for creating snapshots (either command line, or via their API), a script that is quite… Continue reading Rotating EBS Snapshots: ec2-prune-snapshots

ec2-consistent-snapshot on Amazon’s Linux AMI

Update: the complementary article to this one, on Rotating EBS snapshots has now been posted. After the recent failure of EBS volumes on Amazon’s cloud, backup is quite likely something to be considering. If, during the aforementioned incident, recent snapshots of the affected EBS volumes were available, it might have been possible to relaunch instances… Continue reading ec2-consistent-snapshot on Amazon’s Linux AMI

Setting up TinyDNS on Amazon’s Linux

If you need to setup both a DNS Server and DNS Cache, consider http://www.fefe.de/djbdns/#splithorizon – there are some issues with the points below that need to be resolved (specifically the resolv.conf pointing to the dnscache, without pointing the dnscache at the djbdns). DNS nameservers serve the purpose of mapping a domain name to an IP address. Typically,… Continue reading Setting up TinyDNS on Amazon’s Linux

FastCGI on AWS

The following provides a brief outline of the procedure for getting FastCGI (with SuExec and PHP) working on an EC2 instance running Amazon’s Linux distribution (AMI) under Apache 2.2… Compile the Module: (dependencies include the httpd-devel package) sudo -i yum install httpd-devel cd /usr/local/src wget http://www.fastcgi.com/dist/mod_fastcgi-current.tar.gz tar -xzvf mod_fastcgi-2.4.6.tar.gz cd mod_fastcgi-2.4.6 cp Makefile.AP2 Makefile make… Continue reading FastCGI on AWS