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
Tag: aws
Connect to Amazon’s Linux via WinSCP as root
SCP offers a number of advantages over FTP, not the least of which include no setup (you don’t need an FTP server) and increased security. However, when setting up a server, it can be rather inconvenient to be unable to save a file to most directories. The simplest solution, really, is to just upload the… Continue reading Connect to Amazon’s Linux via WinSCP as root
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
PHP-FPM on Amazon’s Linux
Update (Oct 1, 2011): The release notes for the newest version of Amazon’s Linux (2011.09) state that “PHP scripts have the option of using PHP-FPM.” PHP-FPM is now included in the amzn-main repository, and can be installed via yum install php-fpm (it is installed to /usr/sbin). As a point of mention, if you want to… Continue reading PHP-FPM on 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
Upgrading sysklog to rsyslog
As a server setup gets more complex, it is possible that the default syslog (sysklogd) lacks the necessary finely grained filtering that may be desired. Common solutions to this are using syslog-ng or rsyslog. I have opted to go with the latter and found it to, so far, be an excellent replacement. Installing rsyslog Update:… Continue reading Upgrading sysklog to rsyslog
Streaming Media from Cloudfront
As with many AWS products, Cloudfront helps to level the playing field a bit – allowing the individual to have access to the same technologies available to large corporations – of course, that doesn’t always make it cost effective, but it is still pretty cool. The focus of this article is how to leverage the… Continue reading Streaming Media from Cloudfront
Migrating from S3 to Cloudfront
Amazon’s S3 is, as the name suggests, simple storage. It allows for the remote storage of static files, and will serve them on request. While it can be advantageous to use on a website, it is not a true content delivery network, as files are served from a single location (the server hosting the bucket).… Continue reading Migrating from S3 to Cloudfront
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
Setting up nginx as a Reverse Proxy
Procedure for setting up nginx as a reverse proxy on Amazon’s Linux distribution, with Apache running in the background. …Read the Rest
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