Hits : 2269


PostgreSQL


http://www.postgresql.org


http://www.postgresql.gr


top


Requiments


bison
libreadline5-dev


top


Download


wget -c ftp://ftp.postgresql.org/pub/source/v8.3.5/postgresql-8.3.5.tar.bz2
tar jxvf postgresql-8.3.5.tar.bz2
cd postgresql-8.3.5


top


Installation


./configure
gmake
su
gmake install


top


Post-Installation


Ως διαχειριστής :


# echo "/usr/local/pgsql/lib/" >> /etc/ld.so.conf
# ldconfig

# echo "export -p PATH=$PATH:/usr/local/pgsql/bin/" >> .bashrc
# echo "export  -p MAN_PATH=$MAN_PATH:/usr/local/pgsql/man/" >> .bashrc
# source  .bashrc


top


Creating a Database User


$ su - 
# adduser postgres
# mkdir -pv /usr/local/pgsql/data
# chown postgres /usr/local/pgsql/data


top


Creating a Database Cluster


# su - postgres
$ /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data


top


Starting the Database


$ su -
# mkdir -pv /var/log/postgreSQL
# chown -R postgres.postgres /var/log/postgreSQL/
# su - postgres
$ /usr/local/pgsql/bin/pg_ctl start -l /var/log/postgreSQL/logfile -D /usr/local/pgsql/data


top


Status & Stop Database


su - postgres
$ pg_ctl status -D /usr/local/pgsql/data
$ pg_ctl stop -D /usr/local/pgsql/data


top