April 19, 2014
 
 
RSSRSS feed

Apples and Oranges: A Linux DBMS Comparison - page 2

Introducing the Series

  • November 10, 1999
  • By Matthias Warkus

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.

  1. 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.
  2. 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 postgres
    
    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.
  3. Allother steps of the installation need to be done as user postgres if not otherwise mentioned.
  4. Untar the PostgreSQL download and change into the source directory tree:
    tar -xvzf postgresql-6.5.2.tar.gz
    cd postgresql-6.5.2
    
  5. As root, create the PostgreSQL directory and give it to postgres:
    mkdir /opt/pgsql
    chown postgres.users /opt/pgsql
    
  6. Go to the source directory and configure the package. I used the following options:
    ./configure --prefix=/opt/pgsql --with-perl
    
  7. 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.

  1. As root, add the line
    /opt/pgsql/lib
    
    to /etc/ld.so.conf and run ldconfig.
  2. Install Perl bindings. When logged in as root, do:
    cd interfaces/perl5
    make install
    
  3. 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_CTYPE
    
    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.
  4. Source the .profile file:
    source .profile
    
  5. Run the post-installation:
    initdb
    
Sitemap | Contact Us