Detailed installation guides
From PostgreSQL Wiki
Contents |
Any UNIX-Like Platform
Linux
- Gentoo: PostgreSQL Guide (2007-04-25)
- Linux: Installing Apache, PostgreSQL, and PHP on Linux by Chris Smith (2006-02-07)
Debian/Ubuntu
Debian based installs have a somewhat unique design that allows multiple database clusters to be managed independently. This allows running both multiple database instances as well as multiple versions more easily than other packaging schemes.
- Howto setup Database Server With postgresql and pgadmin3 (has a nice intro to general postgresql.conf/pg_hba.conf info applicable to all distributions)
- PostgreSQL Database Server Configuration in Debian
- Using the PostgreSQL Database Server
- postgresql clustering and Debian
- Upgrading to PostgreSQL 8.3 in Debian from 7.4
RedHat/Fedora/CentOS
If you have the packages already installed on your server, RedHat installation can be as easy as:
service postgresql start
In older versions you'll automatically get a call to service postgresql initdb the first time you do this that will create the database cluster; in recent versions you'll need to do that yourself before the above.
You can turn on and off whether PostgreSQL starts at boot like this:
chkconfig postgresql on/off
The default network configuration that RedHat initdb specifies uses the 'ident' mechanism for controlling access to the database, which is often not what people want. See Client Authentication for more information.
RedHat defaults to creating the database in /var/lib/pgsql/data. If you want to change that, or otherwise want to adjust the parameters uses when PostgreSQL is started, you can do that by editing /etc/sysconfig/pgsql/postgresql and putting changes into there. This is a standard shell script file included into the environment; here is a sample with the default parameters, you can pick just the lines from here you want to change and put new values there:
PGDATA=/var/lib/pgsql/data
PGPORT=5432
PGLOG=/var/lib/pgsql/pgstartup.log
PGOPTS=
PGOPTS can be used to set random other options; it is added to the end of the command line used to run the postmaster daemon. But note that any configuration parameters set this way cannot be changed on-the-fly while the postmaster is running. It's usually better to set custom values in postgresql.conf.
Also, if you want to change PGDATA from the default, be aware that the default SELinux configuration in recent Red Hat releases will prevent the postmaster daemon from writing anywhere except /var/lib/pgsql/data. You'll need to change the SELinux setup or at least relabel directory security contexts to put it someplace else.
- RPM Installation by Devrim GÜNDÜZ & Lamar Owen
- PostgreSQL RPM Building Project - Yum Repository
- An Almost Idiot's Guide to PostgreSQL YUM and subsequent 8.3.1 to 8.3.3 upgrade.
- Installing the PostgreSQL 8.2 RPMs on RHEL 5/CentOS 5 by Greg Smith
- Getting Started with PostgreSQL on Redhat 7.0 by Kevin Kemp
- Linux: PostgreSQL Installation/Setup on Fedora Linux (2005-08-28)
- RPM Packaging
FreeBSD
- FreeBSD: PostgreSQL Installation on FreeBSD (2002-08-24)
- FreeBSD: PostgreSQL and Perl on FreeBSD (2000-12-26)
MacOS
- MacOS X: PostgreSQL on Mac OS X
- MacOS X: PostgreSQL On MacOS X (another alternative guide) by Michael Brewer (2002-07-06)
Solaris
- How to Configure and Run PostgreSQL on Solaris 10
- Solaris 10: PostgreSQL 8.2.1 on Solaris 10 – Deployment Guidelines by Chris Drawater (2007-01-15)
- Solaris 10: Related documents for J2EE, Tomcat, and Oracle migrations by Chris Drawater (2007-01-15)
- PostgreSQL 8.1 on Solaris 10 - Deployment Guidelines (160KB - PDF)
Windows
- HOWTO: Change the default PGDATA directory on Windows by Gevik Babakhani
- Windows: PostgreSQL 7.4.1 on Windows installation, using cygwin
