Sunday, September 30, 2012

Setting up PostgreSQL 9.2.1 on Debian Linux

I mentioned how to install PostgreSQL 9.2.1.

I set up PostgreSQL in this way:

adduser --disabled-password postgres

mkdir /usr/local/pgsql/data



chown postgres /usr/local/pgsql/data


su - postgres

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


For starting PostgreSQL, I used:

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

For shutting down PostgreSQL, I used:

/usr/local/pgsql/bin/pg_ctl stop -D /usr/local/pgsql/data







No comments: