Ponderings of a kind

This is my own personal blog, each article is an XML document and the code powering it is hand cranked in XQuery and XSLT. It is fairly simple and has evolved only as I have needed additional functionality. I plan to Open Source the code once it is a bit more mature, however if you would like a copy in the meantime drop me a line.

Atom Feed

Installing Postgres 9.0 onto Amazon EC2 Linux

Amazon Linux and Postgres

Amazon EC2 Linux is based on a customised version of Redhat Enterprise Linux, but sadly they do not seem to have Postgres 9.0 available from their Yum repositories. However with a bit of fiddling around I was able to get it to install, so I have reproduced the details here for everyone else.

1) Download and install the appropriate YUM repository configuration from here -

   $ wget
   $ sudo rpm -i pgdg-redhat-9.0-2.noarch.rpm

2) You need to manually edit the Yum repo file that has just been installed for Postgres 9, as otherwise an unknown release version (as far as the Postgres repo is concerned) will be used, and you wont be able to download and install the packages.
Edit the file /etc/yum.repos.d/pgdg-90-redhat.repo and replace the string “$releasever” with “6.0”

3) You can now install Postgres 9.0 using Yum.

    $ sudo yum install postgresql90-server

4) You can now start up the database

    $ sudo /etc/init.d/postgresql-9.0 initdb
    $ sudo /etc/init.d/postgresql-9.0 start

5) Check that you can login to the server

    $ sudo su – postgres
    -bash-4.1$ psql
    psql (9.0.4)
    Type "help" for help.

Done :-)

Adam Retter posted on Saturday, 9th July 2011 at 16.02 (GMT+02:00)
Updated: Saturday, 9th 2011 at July 16.02 (GMT+02:00)

tags: AmazonAWSEC2LinuxPostgres

Add Comment

(will not be shown)

Tag Cloud