Skip to content

Instantly share code, notes, and snippets.

@lazzarello
Created October 21, 2009 21:08
Show Gist options
  • Save lazzarello/215454 to your computer and use it in GitHub Desktop.
Save lazzarello/215454 to your computer and use it in GitHub Desktop.
###########################################################
# A startup item has been generated that will aid in
# starting postgresql84-server with launchd. It is disabled
# by default. Execute the following command to start it,
# and to cause it to launch at startup:
#
# sudo launchctl load -w /Library/LaunchDaemons/org.macports.postgresql84-server.plist
###########################################################
---> Installing postgresql84-server @8.4.1_0
To create a database instance, after install do
sudo mkdir -p /opt/local/var/db/postgresql84/defaultdb
sudo chown postgres:postgres /opt/local/var/db/postgresql84/defaultdb
sudo su postgres -c '/opt/local/lib/postgresql84/bin/initdb -D /opt/local/var/db/postgresql84/defaultdb'
To tweak your DBMS, consider increasing kern.sysv.shmmax by adding an increased kern.sysv.shmmax .. to /etc/sysctl.conf
/opt/local/lib/postgresql84/bin/postgres -D /opt/local/var/db/postgresql84/defaultdb
or
/opt/local/lib/postgresql84/bin/pg_ctl -D /opt/local/var/db/postgresql84/defaultdb -l logfile start
sudo env ARCHFLAGS="-arch i386" \
gem install postgres -- \
--with-pgsql-lib=/opt/local/lib/postgresql83 \
--with-pgsql-include=/opt/local/include/postgresql83
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment