yum install http://yum.postgresql.org/9.4/redhat/rhel-7-x86_64/pgdg-centos94-9.4-2.noarch.rpm http://repo.zabbix.com/zabbix/2.4/rhel/7/x86_64/zabbix-release-2.4-1.el7.noarch.rpm epel-release
yum install zabbix-server-pgsql zabbix-agent zabbix-web-pgsql postgresql94-server httpd php
sed -i 's/SELINUX=\(enforcing\|permissive\)/SELINUX=disabled/g' /etc/selinux/config
setenforce 0
/usr/pgsql-9.4/bin/postgresql94-setup initdb
Change the lines 77~84 from:
# TYPE DATABASE USER ADDRESS METHOD
# "local" is for Unix domain socket connections only
local all all peer
# IPv4 local connections:
host all all 127.0.0.1/32 ident
# IPv6 local connections:
host all all ::1/128 trustTo:
# TYPE DATABASE USER ADDRESS METHOD
# "local" is for Unix domain socket connections only
local all all trust
# IPv4 local connections:
host all all 127.0.0.1/32 trust
# IPv6 local connections:
host all all ::1/128 trustsystemctl enable postgresql-9.4.service
systemctl start postgresql-9.4.service
Create the users and db:
createuser -U postgres zabbix
createdb -U postgres -O zabbix zabbix
Then run the database scripts
psql -U zabbix -f /usr/share/doc/zabbix-server-pgsql-2.4.7/create/schema.sql
psql -U zabbix -f /usr/share/doc/zabbix-server-pgsql-2.4.7/create/images.sql
psql -U zabbix -f /usr/share/doc/zabbix-server-pgsql-2.4.7/create/data.sql