PostgreSQL

What is PostgreSQL?

PostgreSQL is one of major database software in Open Source.

Installation of PostgreSQL

1. Download the latest PostgreSQL version at http://www.postgresql.org .
2. Check your compiler version by gmake -v >3.75 and gcc -v >2.7.2 .
3. login as root and adduser postgres .
4. Set up directories
#mkdir /usr/local/pgsql
#chown postgres:postgres /usr/local/pgsql
#mkdir /usr/local/src
#mkdir /usr/local/src/pgsql
#chown postgres:postgres /usr/local/src/pgsql
5. Unzip the .tar.gz
# su postgres
$ tar -xzvf /tmp/postgresql-vxxx.tar.gz
$ mv postgresql-vxxx /usr/local/src/pgsql
6. Install the database
$ cd /usr/local/src/pgsql/postgresql-vxxx/src
$ ./configure --with-mb=LATIN1
$ gmake
$ gmake install

Start PostgreSQL

Edit .bashrc as follows:
LD_LIBRARY_PATH=/usr/local/pgsql/lib
export LD_LIBRARY_PATH

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

Create a new user
$createuser nobody

Connect to the database
$psql template1

Web Sites

Official Site
GUI for Linux pgaccess
VC GUI for PostgreSQL server

Newsgroup