Postgres di Mac ariekeren akhirnya sukses! Postgres di Mac tuh mudah banget !!! :p

Posted: February 5, 2007 in ノート

Awalnya ngikutin sih deg deg an

sayang:~/idruby arie$ port installed |grep readline

  readline @5.1.004_0 (active)

sayang:~/idruby arie$ svn st

sayang:~/idruby arie$ sudo chown -R postgres /usr/local/pgsql/


sayang:~/idruby arie$ su - postgres


sayang:~ postgres$ /usr/local/bin/initdb -E UTF8 -D /usr/local/pgsql/

doc      include  lib      share

sayang:~ postgres$ /usr/local/bin/initdb -E UTF8 -D /usr/local/pgsql/data

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 C.

creating directory /usr/local/pgsql/data ... ok

creating subdirectories ... ok

selecting default max_connections ... 30

selecting default shared_buffers/max_fsm_pages ... 2400kB/20000

creating configuration files ... ok

creating template1 database in /usr/local/pgsql/data/base/1 ... ok

initializing pg_authid ... ok

initializing dependencies ... ok

creating system views ... ok

loading system objects' descriptions ... ok

creating conversions ... 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:

/usr/local/bin/postgres -D /usr/local/pgsql/data


    /usr/local/bin/pg_ctl -D /usr/local/pgsql/data -l logfile start

sayang:~ postgres$ /usr/local/bin/pg_ctl -D /usr/local/pgsql/data -l postgres.log start

server starting

sayang:~ postgres$ /usr/local/bin/createdb test


sayang:~ postgres$ /usr/local/bin/psql test

Welcome to psql 8.2.1, the PostgreSQL interactive terminal.

Type:  \copyright for distribution terms

       \h for help with SQL commands

       \? for help with psql commands

       \g or terminate with semicolon to execute query

       \q to quit

test=# show tables;

ERROR:  unrecognized configuration parameter "tables"

test=# \q

sayang:~ postgres$

Implementasi dari Sumber


tinggalkan feedback konstruktif atau lebih baik diam

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s