Gentoo Wiki


Merge-arrows.gifIt has been suggested that this article be Merged into one article with PostgreSQL/Install.    (Discuss)


The PostgreSQL package maintainers are reorganizing things, and this is the new way to install postgresql, especially version 8.3 and future versions.

The new packages are:

They're currently masked (but not hard-masked), so you'll have to unmask them in /etc/portage/package.keywords.

If you currently have dev-db/libpq and dev-db/postgresql installed, you should probably remove them (after backing up the databases).

After that, do:

emerge -av dev-db/postgresql-server

These new packages are slotted, so you can have multiple versions coexisting on the same system.

E.g. for PostgreSQL 8.3, the startup script is /etc/init.d/postgresql-8.3 and the data is in /var/lib/postgresql/8.3 by default.

The first time you should probably do:

emerge -a --config postgresql-server

to set up the initial database.

Then as usual, start it with:

/etc/init.d/postgresql-8.3 start

and set it to start automatically with:

rc-update add postgresql-8.3 default

For more configuration and maintenance details, see the old install page.

See also

Retrieved from ""

Last modified: Sat, 06 Sep 2008 15:46:00 +0000 Hits: 409