PostgreSQL
Requiments
bison
libreadline5-dev
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
Installation
./configure gmake su gmake install
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
Creating a Database User
$ su - # adduser postgres # mkdir -pv /usr/local/pgsql/data # chown postgres /usr/local/pgsql/data
Creating a Database Cluster
# su - postgres $ /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
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
Status & Stop Database
su - postgres $ pg_ctl status -D /usr/local/pgsql/data $ pg_ctl stop -D /usr/local/pgsql/data