Skip to content

Instantly share code, notes, and snippets.

@boscomonkey
Created December 15, 2010 00:46
Show Gist options
  • Save boscomonkey/741425 to your computer and use it in GitHub Desktop.
Save boscomonkey/741425 to your computer and use it in GitHub Desktop.
Transcript from "sudo port install postgresql83-server" on MBP 10.6.5
---> Computing dependencies for postgresql83-server
---> Fetching postgresql83-server
---> Verifying checksum(s) for postgresql83-server
---> Extracting postgresql83-server
---> Configuring postgresql83-server
---> Building postgresql83-server
---> Staging postgresql83-server into destroot
---> Creating launchd control script
###########################################################
# A startup item has been generated that will aid in
# starting postgresql83-server with launchd. It is disabled
# by default. Execute the following command to start it,
# and to cause it to launch at startup:
#
# sudo port load postgresql83-server
###########################################################
---> Installing postgresql83-server @8.3.12_0
To create a database instance, after install do
sudo mkdir -p /opt/local/var/db/postgresql83/defaultdb
sudo chown postgres:postgres /opt/local/var/db/postgresql83/defaultdb
sudo su postgres -c '/opt/local/lib/postgresql83/bin/initdb -D /opt/local/var/db/postgresql83/defaultdb'
To tweak your DBMS, consider increasing kern.sysv.shmmax by adding an increased kern.sysv.shmmax .. to /etc/sysctl.conf
---> Activating postgresql83-server @8.3.12_0
---> Cleaning postgresql83-server
@boscomonkey
Copy link
Author

The command:
sudo su postgres -c '/opt/local/lib/postgresql83/bin/initdb -D /opt/local/var/db/postgresql83/defaultdb'
created the following output:

The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

The database cluster will be initialized with locale en_US.UTF-8.
The default database encoding has accordingly been set to UTF8.
The default text search configuration will be set to "english".

fixing permissions on existing directory /opt/local/var/db/postgresql83/defaultdb ... ok
creating subdirectories ... ok
selecting default max_connections ... 20
selecting default shared_buffers/max_fsm_pages ... 1600kB/20000
creating configuration files ... ok
creating template1 database in /opt/local/var/db/postgresql83/defaultdb/base/1 ... ok
initializing pg_authid ... ok
initializing dependencies ... ok
creating system views ... ok
loading system objects' descriptions ... ok
creating conversions ... ok
creating dictionaries ... ok
setting privileges on built-in objects ... ok
creating information schema ... ok
vacuuming database template1 ... ok
copying template1 to template0 ... ok
copying template1 to postgres ... ok

WARNING: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the -A option the
next time you run initdb.

Success. You can now start the database server using:

/opt/local/lib/postgresql83/bin/postgres -D /opt/local/var/db/postgresql83/defaultdb

or
/opt/local/lib/postgresql83/bin/pg_ctl -D /opt/local/var/db/postgresql83/defaultdb -l logfile start

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment