
21.4 TCP/IP Connections
The PostgreSQL server needs to be configured to accept TCP/IP connections so that it can be used with the Rhino SLEE.
As of version 8.0 of PostgreSQL this parameter is no longer required, and the database will accept TCP/IP socket connects by
default.
Prior to version 8.0 of PostgreSQL, it was necessary to manually enable TCP/IP support. To do this, edit the
tcpip_socket
parameter in the
$PGDATA/postgresql.conf
file:
tcpip_socket = 1
21.5 Access Control
The default installation of PostgreSQL trusts connections from the local host. If the Rhino SLEE and PostgreSQL are installed
on the same host the access control for the default configuration is sufficient. An example access control configuration is shown
below, from the file
$PGDATA/pg_hba.conf
:
#TYPE DATABASE USER IP-ADDRESS IP-MASK METHOD
local all all trust
host all all 127.0.0.1 255.255.255.255 trust
When the Rhino SLEE and PostgreSQL are required to be installed on separate hosts, or when a stricter security policy is
needed, then the access control rules in
$PGDATA/pg_hba.conf
will need to be tailored to allow connections from Rhino to the
database manager. For example, to allow connections from a Rhino instance on another host:
#TYPE DATABASE USER IP-ADDRESS IP-MASK METHOD
local all all trust
host all all 127.0.0.1 255.255.255.255 trust
host rhino postgres 192.168.0.5 255.255.255.0 password
Once these changes have been made, it is necessary to completely restart the PostgreSQL server. Telling the server to reload
the configuration file does not cause it to enable TCP/IP networking as this is initialised when the database is initialised.
To restart PostgreSQL, either use the command supplied by the package (for example, “
/etc/init.d/postgresql restart
”),
or use the “
pg_ctl restart
” command provided with PostgreSQL.
21.6 Multiple PostgreSQL Support
The Rhino SLEE supports communications with multiple PostgreSQL database servers. This adds an extra level of fault
tolerance for the main working memory, the runtime configuration and the working state of the Rhino SLEE.
The main working memory is constantly synchronized in each database server, in the instance of PostgreSQL failure or no
longer being network reachable the most integral PostgreSQL host is automatically selected as the definitive main working
memory for the cluster.
21.6.1 Configuration
Every node in the cluster must be configured to use each PostgreSQL database server. Illustrated by figure 21.1.
Open Cloud Rhino 1.4.3 Administration Manual v1.1 123
Comentarios a estos manuales