|
Step-by-step Installation
Step 1. PostgreSQL Installation Checkup.
First, check if you have PostgreSQL database server
already installed.
You may do this by entering the following command into your command
prompt:
which psql
If you get the following (or similar):
/usr/local/pgsql/bin/psql,
this means you already have got PostgreSQL database software installed.
Using the rpm -q command is an alternative
way to check if PostgreSQL is installed. Type the following command
in your command prompt:
rpm -qa | grep postgresql
If you get
postgresql-7.1.3-1
or something alike when the command is executed, it will mean that
you already have PostgreSQL database software installed.
Now you may use the existing one or install a later version of
PostgreSQL.
WARNING: H-Sphere requires
Postgres version 7.1 or higher.
Step 2. Downloading PostgreSQL
(skip this step if PostgreSQL is already installed)
If you don't have PGSQL installed, you will need to
download PGSQL from binary RPM distribution from www.postgresql.org
or its mirror sites.
Find RMP file which is usually stored in the software/download
directory
Download it.
Step 3. PostgreSQL Installation
Install the PGSQL database software. Do this by following
command:
rpm -i postgresql_rpm_file_name
where postgresql_rpm_file_name is PGSQL binary RPM distribution.
Peculiarities of Configuration
To configure the access to PostgreSQL DBs, go to PostgreSQL
home directory /usr/local/pgsql (or similar) and find the
/data/pg_hba.conf file. Open it and find the records similar
to the ones below:
|
TYPE
|
DATABASE
|
IP_ADDRESS
|
MASK
|
AUTHTYPE MAP
|
|
|
local
|
all
|
|
|
trust
|
|
|
host
|
all
|
127.0.0.1
|
255.255.255.255
|
password
|
|
If the 'AUTHTYPE' parameter is set to trust,
you must change the authentication option to password.
* For more detail configuration see pg_hba.conf file.
To make H-Sphere scripts work properly, go to PostgreSQL
home directory /usr/local/pgsql (or similar) and find the
/data/global/pg_pwd file.
Open it and find the record of the respective postgres user similar
to this:
postgres 0 x x x x abcdefgh \N
If you can't find such record, execute the following
commands:
1) psql -d template1 -U postgres
2) alter user postgres with password 'postgres_password';
The record similar to:
postgres 0 x x x x postgres_password \N
should appear in the pg_pwd file.
phpPgAdmin
If you are going to use phpPgAdmin in your
H-Sphere 2.x installation, some additional operations should be
done. Firstly, get phpPgAdmin version 2.3 or higher (download it
from tar -zxf phpPgAdmin.tar.gz) (http://sourceforge.net/projects/phppgadmin)
Change PGSQL into PostgreSQL.
|