How to set up an DPM nameserver with a postgres backend
=======================================================
The DPM nameserver (DPNS) is run by the dpmmgr user. This user
requires a copy of the host certificate files:
cp -p /etc/grid-security/hostcert.pem /etc/grid-security/dpmmgr/dpmcert.pem
cp -p /etc/grid-security/hostkey.pem /etc/grid-security/dpmmgr/dpmkey.pem
chown dpmmgr:dpmmgr /etc/grid-security/dpmmgr/dpm*
Create a postgres database user for the DPNS server:
createuser -P <user>
The command above will prompt you for a password for the new user.
Create the DPNS database:
createdb -O <user> <dbname>
Create the DPNS database tables:
psql -W -U <user> <dbname> -f /usr/share/dpm/create_dpns_tables_postgres.sql
Let the DPNS server know about the account information and make sure
only the dpmmgr user can read this information:
touch /etc/DPNSCONFIG
chmod 600 /etc/DPNSCONFIG
chown dpmmgr:dpmmgr /etc/DPNSCONFIG
echo <user>/<password>@<dbserver>/<dbname> > /etc/DPNSCONFIG
If the /<dbname> part is omitted the database "cns_db" will be used.
If you have a firewall, open the DPNS server port (5010).
Once the configuration is completed, start the DPNS server:
service dpm-postgres-nameserver start
If you want to start the service automatically at boot time:
chkconfig --add dpm-postgres-nameserver