This page explains it really well: http://developer.apple.com/internet/opensource/postgres.html
Short form:
For completeness, here's the initialization procedure as well:
export LD_LIBRARY_PATH=/usr/local/pgsql/lib
export MANPATH=/usr/local/pgsql/man:$MANPATH
export PATH=/usr/local/pgsql/bin:$PATH
Short form:
- Install Fink (you're going to want Fink and probably FinkCommander anyway, if you are a developer)
sudo /sw/bin/fink install readline
- Download and unzip the latest tarball of the Postrgres code from ftp://ftp12.us.postgresql.org/postgresql/latest/ (or another mirror)
- Configure with the options of your choice. These were my choices:
- ./configure --with-includes=/sw/include/ --with-libraries=/sw/lib --with-perl --with-python --with-bonjour --enable-thread-safety
- Build
- make
- make install
For completeness, here's the initialization procedure as well:
- Create a postgres user
- sudo bash
- mkdir -p /usr/local/pgsql/data
- chown -R postgres /usr/local/pgsql/data
- su postgres
/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
- /usr/local/pgsql/bin/psql
- CREATE USER your_user_name WITH PASSWORD 'fooBar';
- CREATE DATABASE your_user_name;
export LD_LIBRARY_PATH=/usr/local/pgsql/lib
export MANPATH=/usr/local/pgsql/man:$MANPATH
export PATH=/usr/local/pgsql/bin:$PATH
There are no comments on this entry. (Reply.)