Apples and Oranges: A Linux DBMS Comparison Acquiring and Installing PostgreSQL Matthias Warkus
Wednesday, November 10, 1999 03:04:53 PM
At the software section of the PostgreSQL Web site there is a list of FTP and HTTP mirrors to download distributions from, as well as the option to order the DBMS on CD. Building and installing it is a multistep process.
First of all, if you want PostgreSQL's Perl bindings to be built, the Perl 5 executable on your system must be known under the name of perl5. Usually, that means you need to make a symbolic link.
Perhaps the most important thing to do is create a postgres user. On my system, this command worked:
On other systems, the command might be different. Note that I assume postgres is in the users group. You might prefer to give the database administrator its own group.
Allother steps of the installation need to be done as user postgres if not otherwise mentioned.
Untar the PostgreSQL download and change into the source directory tree:
tar -xvzf postgresql-6.5.2.tar.gz
cd postgresql-6.5.2
As root, create the PostgreSQL directory and give it to postgres:
mkdir /opt/pgsql
chown postgres.users /opt/pgsql
Go to the source directory and configure the package. I used the following options:
./configure --prefix=/opt/pgsql --with-perl
Do the building and installation process:
cd ../doc
make install
cd ../src
make all
make install
Now it's time to perform some additional system configuration.
As root, add the line
/opt/pgsql/lib
to /etc/ld.so.conf and run ldconfig.
Install Perl bindings. When logged in as root, do:
cd interfaces/perl5
make install
Set the postgres account up. Add to the following to the .profile file:
The last three lines are necessary for the init process and maybe some tests. For actual users, they should of course be set to the appropriate locale, but everyone who uses PostgreSQL needs to have at least PGLIB and PGDATA set.