
February 21st, 2013, 03:31 PM
|
|
Registered User
|
|
Join Date: Feb 2013
Posts: 1
Time spent in forums: 22 m 37 sec
Reputation Power: 0
|
|
|
First time installation, not working
Hello,
I am attempting to install Postgresql for the first time.
The installation will be for Zabbix NMS.
I have installed pgsql 9.2 on Centos 6.3.
I set up an access right to pgsql by adding this line to /var/lib/pgsql/data/pg_hba.conf:
local zabbix zabbix md5
I then created a user in pgsql and a database for zabbix:
su - postgres
psql
CREATE USER zabbix WITH PASSWORD 'abc123';
CREATE DATABASE zabbix OWNER zabbix;
\q
exit
Finally, I try load some schema data via psql:
[root@zabbix lib]# cd /usr/share/zabbix-postgresql
[root@zabbix zabbix-postgresql]# cat schema.sql | psql -U zabbix zabbix
psql: FATAL: Peer authentication failed for user "zabbix"
[root@zabbix zabbix-postgresql]# cat schema.sql | psql -U zabbix zabbix -W
Password for user zabbix:
psql: FATAL: Peer authentication failed for user "zabbix"
[root@zabbix zabbix-postgresql]#
I have tried many permutations of the pg_hba.conf file but cannot find one the allows the zabbix user to "log in" or access the database successfully.
Can someone help me understand what I don't have configured correctly?
Thanks for any and all help that you can give.
Bryan Hunt
|