-
Notifications
You must be signed in to change notification settings - Fork 9
Installation Step 3
Now is a good time to create Postgresql user ngnms We use the same ngnms user to simplify installation in manual, but in theory any other user should work if proper settings are propagated to all configuration files.
Easiest option of all is do this:
$ createuser --interactive --pwprompt
Enter name of role to add: ngnms
Enter password for new role:
Enter it again:
Shall the new role be a superuser? (y/n) n
Shall the new role be allowed to create databases? (y/n) y
Shall the new role be allowed to create more new roles? (y/n) n
It will create the user with password and rights to create DBs. If DB admin and ngnms roles are to be shared, add superuser role to the new user as well.
Or alternatively you can do this from psql client as postgres superuser:
$ psql
CREATE USER ngnms CREATEDB;
Do not create a new database just yet. We provide a script, which will help you with this and related tasks.
Verify your work by troubleshooting DB connections:
A) - test if firewall is open with telnet
[root@host]# telnet localhost 5432
Trying ::1...
Connected to localhost.
Escape character is '^]'.
....hit Enter once or twice, the caret should move to another line if connection was successful... until you see this.
Connection closed by foreign host.
In this case your firewall permits connections and DB is accepting connections.
B) - test authentication with postgresql client used in your setup. Below is an example when authentication is configured incorrectly.
[user@host]$ psql --host localhost --port 5432 --user ngnms --password {your password here} -d ngnms
Password for user ngnms:
psql: FATAL: Ident authentication failed for user "ngnms"
In this case go back to Installation Step 1 for DB configuration and tuning section and make sure that METHOD is set to password or md5.