I have been working over the last months for PostgreSQL 9.0 RPMs. As Debian/Ubuntu folks have been doing
over the years, I now enabled multiple PostgreSQL installation with RPMs.
Given that PostgreSQL 9.0 Beta 1 was released yesterday, we need more people to test it. Currently we have RPMs for Fedora 7,8,12, and RHEL/CentOS 4,5 for all architectures.
Anyway, this is a quick guide about installing PostgreSQL 9.0 Beta1 (which will probably apply to stable release as well) on Fedora/CentOS/RHEL. Currently none of these distros have PostgreSQL 9.0 in their stable / development trees, so I will use my repository here.
This article assumes that you have root or sudo access on the server.
The first step is installing repository RPMs. Repo RPMs are here:
http://yum.pgrpms.org/reporpms/repoview/letter_p.group.html
Now, install postgresql packages:
yum install postgresql-server
(This will also install postgresql package, and it will probably install/update client libraries, including compat ones).
As of 9.0, on-disk layout changed a bit. In the previous versions, PostgreSQL RPMs used /var/lib/pgsql/data as the data directory, /usr/binfor binaries, etc.. As of 9.0, the new layout is:
Executables: /usr/pgsql-9.0/bin
Libraries: /usr/pgsql-9.0/lib (or /usr/pgsql-9.0/lib64)
Documentation: /usr/pgsql-9.0/share/doc/postgresql-docs-x.y.z/html
Contrib /usr/pgsql-9.0/share/pgsql/contrib
Data: /var/lib/pgsql/9.0/data
Backup area: /var/lib/pgsql/9.0/backups
Templates: /usr/pgsql-9.0/share/pgsql
Procedural Languages: /usr/pgsql-9.0/lib/pgsql or /usr/pgsql-9.0/lib64/pgsql
Development Headers: /usr/pgsql-9.0/include/pgsql
Other shared data: /usr/pgsql-9.0/share/pgsql
Regression tests: /usr/pgsql-9.0/lib/pgsql/test/regress (in the -test package)
or /usr/pgsql-9.0/lib64/pgsql/test/regress
Documentation SGML: /usr/pgsql-9.0/share/doc/postgresql-docs-x.y.z/sgml
In order to make our lives easier, new RPMs will use benefits of alternatives feature. psql, pg_dump and pg_dumpall will be available under /usr/bin. These tools support previous releases, so in in the new versions, you will be also able to use back releases with these tools.
Next, initialize the cluster:
service postgresql-9.0 initdb
(Please note that traditional init script name also changed. I added version number suffix to the init script)
This command will initialize the cluster under /var/lib/pgsql/9.0/data directory.
Starting the server is easy:
service postgresql-9.0 start
In order to enable automatic starting of the PostgreSQL cluster on each boot, use ckconfig tool :
chkconfig postgresql-9.0 on
This is enough for installing PostgreSQL 9.0 on Fedora/CentOS/RHEL. Now, please test