
76 Configuring and Maintaining Your Server
4 Open the file /var/lib/pgsql/data/postgresql.conf with a
text editor. If you are installing PostgreSQL version earlier than 8, add
the line tcpip_socket = true to this file. If you are installing
PostgreSQL version later than 8, add the line listen_addresses =
'*'.
5 Open the file /var/lib/pgsql/data/pg_hba.conf with a text
editor and make sure the following lines are there:
# local DATABASE USER METHOD [OPTION]
local samegroup all password
# host DATABASE USER IP-ADDRESS IP-MASK METHOD [OPTION]
host samegroup all 0.0.0.0 0.0.0.0 md5
6 To restart PostgreSQL, issue the following command at the prompt:
service postgresql restart
7 To set the database server administrator‘s password, issue the
following commands at the prompt (change 'your_desired_password'
to anything you like):
psql -d template1 -U postgres
alter user postgres with password 'your_desired_password';
8 Now proceed to the instructions on registering your database server
with Plesk.
To register a database server with Plesk:
1 Log in to Plesk.
2 Click the Server shortcut in the navigation pane.
3 Click the Database Servers icon in the Services group.
4 Click the Add Database Server icon in the Tools group.
5 Specify the properties of the database server:
Specify hostname or IP address of the database server.
Specify the port number the database server is listening on. By default, MySQL
servers listen on port 3306, and PostgreSQL on port 5342. You can leave the
Port number box blank, if your database server is listening on the default port.
Specify which database type is running on the database server.
To make this database server default for hosting customers‘ databases, select
the check box labeled Use this server as default for MySQL. If you have a
PostgreSQL database server, select the check box labeled Use this server as
default for PostgreSQL.
Specify the database server administrator's login name and password.
6 Click OK.