Apples and Oranges: A Linux DBMS Comparison - page 2
Introducing the Series
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:
useradd -c "PostgreSQL Administrator" -d /opt/postgresql -g users postgresOn 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/libto /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:
PATH=$PATH:/opt/pgsql/bin MANPATH=$MANPATH:/opt/pgsql/man PGLIB=/opt/pgsql/lib PGDATA=/opt/pgsql/data export PATH MANPATH PGLIB PGDATA LC_COLLATE=C LC_CTYPE=C export LC_COLLATE LC_CTYPEThe 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.
- Source the .profile file:
- Run the post-installation:
Sponsored by BlackBerry
BlackBerry® Enterprise Server Express enables businesses of any size to quickly and easily get started with the BlackBerry solution. It provides advanced BlackBerry smartphone features with no additional software or user license fees, and works with any Internet-enabled BlackBerry data plan or a BlackBerry enterprise data plan. Download now!