Amazon Linux AMI
The Amazon Linux AMI is a supported and maintained Linux image provided by Amazon Web Services for use on Amazon Elastic Compute Cloud (Amazon EC2). It is designed to provide a stable, secure, and high performance execution environment for applications running on Amazon EC2. It also includes packages that enable easy integration with AWS, including launch configuration tools and many popular AWS libraries and tools. Amazon Web Services provides ongoing security and maintenance updates to all instances running the Amazon Linux AMI. The Amazon Linux AMI is provided at no additional charge to Amazon EC2 users.
It comes bundled with postgresql 8.4 which is good enough, but gee, I like bleeding edge stuff and postgresql has improved much since =-)
I followed this tutorial made by some altruistic guy that also shares his discoveries (what would it be the internet without people like that?)
And everything went smoothly, so smoothly that I'm smiling =-).
I'm reproducing the important parts here as a backup.
Update the yum repositories I want to install the latest stable postgresql from pgrpms.org. We could just download the rpm and manually install from the file, but that inevitably results in some dependency issues. I prefer to configure an alternate yum repository for a particular keyword. So we need to update the configuration for the Amazon repositories (be sure to update both "main" and "updates", and do not forget the asterisk). sudo vim /etc/yum.repos.d/amzn-main.repo [At the bottom of the "[amzn-main]" section, after "enabled=1", add "exclude=postgresql*"] sudo vim /etc/yum.repos.d/amzn-updates.repo [Add the same exclude to the bottom of the "[amzn-updates]" section] Download the repository/key installation rpm from pgrpms.org wget http://yum.pgrpms.org/reporpms/9.0/pgdg-redhat-9.0-2.noarch.rpm sudo rpm -ivh pgdg-redhat-9.0-2.noarch.rpm Since this rpm is generated for RHEL6, we need to make a minor change to the resulting /etc/yum.repos.d/pgdg-90-redhat.repo file. Update the URLs, replacing the $releaseserver value with '6'. The Amazon Linux $releaseserver value is a date, instead of the primary version number that this repository configuration is expecting. sudo vim /etc/yum.repos.d/pgdg-90-redhat.repo The updated base url values should look like this (update two of them): ## ORIGINAL # baseurl=http://yum.pgrpms.org/9.0/redhat/rhel-$releasever-$basearch ## UPDATED baseurl=http://yum.pgrpms.org/9.0/redhat/rhel-6-$basearch All we have done is told yum that it should use the amzn repositories for everything except packages that meet the "postgresql*" criteria. After that, install a new repository configuration for the pgrpms.org repository.