Text Size: Normal / Large

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.


User Comments


Eric Pugh
28 Jun 2007 19:12:21

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

Christopher Gassib
17 Sep 2007 2:13:52

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

Rick Graves
24 Sep 2007 9:40:42

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.

New comments cannot be added to old documentation versions.

Privacy Policy | Project hosted by our server sponsors. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group