| PostgreSQL 8.2.23 Documentation | ||||
|---|---|---|---|---|
| Prev | Fast Backward | Chapter 14. Installation Instructions | Fast Forward | Next |
./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.
On Mac OS X, make is the same as gmake.
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
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.