This page in other versions: 9.0 / 9.1 / 9.2 / 9.3 / 9.4  |  Development versions: devel  |  Unsupported versions: 8.2 / 8.3 / 8.4

14.1. Short Version

./configure
gmake
su
gmake install
adduser postgres
mkdir /usr/local/pgsql/data
chown postgres /usr/local/pgsql/data
su - postgres
/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
/usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data >logfile 2>&1 &
/usr/local/pgsql/bin/createdb test
/usr/local/pgsql/bin/psql test

The long version is the rest of this chapter.

Comments


June 28, 2007, 7:12 p.m.

On Mac OS X, make is the same as gmake.


Sept. 17, 2007, 2:13 a.m.

On Mac OS X, you could replace the line "adduser postgres" with the following:

dscl / -create /Users/postgres
dscl / -create /Users/postgres UserShell /bin/bash
dscl / -create /Users/postgres RealName "PostgreSQL User"
dscl / -create /Users/postgres UniqueID 1000
dscl / -create /Users/postgres PrimaryGroupID 1000
dscl / -create /Groups/postgres
dscl / -create /Groups/postgres RealName "PostgreSQL Group"
dscl / -create /Groups/postgres PrimaryGroupID 1000
dscl / -append /Groups/postgres GroupMembership postgres


Sept. 24, 2007, 9:40 a.m.

To make postgresql work when the data directory is in a non-default location (such as /srv/postgresql/data), I had to put copies of (symbolic links to) the server.crt, serverkey and root files in the (non-default) data directory -- otherwise, no go. I found those 3 files /var/lib/postgresql/8/1/main.

I am running postgresql-8.1 on ubunty 6.06.

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group