Build PostgreSQL Server
Author:Liangzhi Zou
PostgreSQL is a sophisticated Object-Relational DBMS,
supporting almost all SQL constructs,including subselects,transaction,
and user-defined types and functions.It is the most advanced
open-source database available anywhere.Commercial Support is also
available.1.Source postgresql-7.1.1.tar.gz 2.Install First you have to add user "postgres" for current system. #adduser postgresFor PostgreSQL,UNIX System V shared memory is essential.Rebuild kernel if your current kernel has not below keyword. options SYSVSHM options SYSVSEM options SYSVMSGUncompress the tar file. #su - postgres $cd /usr/local/src $tar -xvzf postgresql-7.1.1.tar.gzCompile and Install. $cd /usr/local/src/postgresql-7.1.1/ $./configure --enable-multibyte=EUC_JP --enable-syslog $make all $make installDefault install directory is /usr/local/pgsql. #chown postgres:postgres /usr/local/pgsql3.Environment Set If it is bash,add follow lines to $HOME/.bashrc file. PATH="$PATH:/usr/local/pgsql/bin export POSTGRES_HOME=/usr/local/pgsql export PGLIB=$POSTGRES_HOME/lib export PGDATA=$POSTGRES_HOME/data export MANPATH="$MANPATH:$POSTGRE_HOME/man"4.Inital Database $initdb/usr/local/pgsql/data directory will be created. 5.Modify postgresql.conf file. There are so much options in postgresql.conf file.I will recommend some essential options as follow.(postgresql.conf file is in /usr/local/pgsql/data/) # # Connection Parameters # tcpip_socket = on # # Debug display # silent_mode = on # # Syslog # syslog = 2sample 6.Automatic start postgreSQL add the postgres to /etc/rc.d/init.d $su - root #mv postgres /etc/rc.d/init.d #chmod 755 /etc/rc.d/init.d/postgres #chkconfig --add postgres |