When deploying Hybrid Access Gateway in distributed mode, the PostgreSQL internal database must be configured to accept external incoming connections. Expand |
---|
title | Configure PostgreSQL to listen on external interfaces |
---|
| : | - Log in over ssh to the appliance.
ssh <host> -l agadmin - Edit the file postgresql.conf.
sudo vi /opt/postgres/9.1/data/postgresql.conf - Change the parameter
listen_addresses to, for example, 0.0.0.0 or the IP of the appliance selected for running the database.
listen_addresses = '<ip>' - Restart the database for changes to take effect.
sudo /etc/init.d/postgres-9.1-openscg restart
|
Expand |
---|
title | Allow another appliance to access the PostgreSQL database |
---|
| - Login over ssh to the appliance.
ssh <host> -l agadmin - Edit the file pg_hba.conf.
sudo vi /opt/postgres/9.1/data/pg_hba.conf - Insert these lines (before "
::1/128 reject "), and change <ip> to IP of the appliances.
host all all <ip1>/32 trust
host all all <ip2>/32 trust - Restart the database for changes to take effect.
/etc/init.d/postgres-9.1-openscg restart - Test that the connection works, change
<ip> to IP of the appliance.
/opt/postgres/9.1/bin/psql -h <ip> -U hag -d hag hag=> \q - Adapt the setting in Administration Service section Manage System > Database Service, see Configure Database service.
jdbc:postgresql://<ip>/hag
|
|