2. Installation

2.1. Download

Currently, pgSphere is not yet part of the PostgreSQL software. You can download it from the pgSphere homepage.

2.2. Installation

You will need PostgreSQL 7.3 or above. We assume that you have PostgreSQL already compiled and installed. Make sure you are logged in as the system superuser.

Change into POSTGRESQL_SRC/src/contrib. If the sources are not yet installed and the directory pg_sphere does not exist, take the gzipped pgSphere sources ( e.g., pg_sphere_xxx.tgz ) and run:


shell> tar -xzf pg_sphere_xxx.tgz
            

Now, change into the pg_sphere directory and run :


shell> make
            

and to install pgSphere :


shell> make install
            

To check the installation, you have to be logged in as the PostgreSQL (!) superuser of your system. Change into the pg_sphere source directory again and run:


shell> make installcheck
            

The check status will be displayed.

2.3. Creating a database with pgSphere

We assume you have already created a database datab, where datab is the name of any database. Now change into the directory POSTGRESQL_INSTALL_PATH/share/contrib. Presupposing the name of your PostgreSQL's superuser is postgres type:


shell> psql -U postgres datab < pg_sphere.sql
            

Depending on your system, it may be necessary to give more psql options like port or host name. Please have a look at the PostgreSQL documentation for more details.