Professional Documents
Culture Documents
3 Server Installation With Postgresql Database Red Hat Enterprise Linux / Centos
3 Server Installation With Postgresql Database Red Hat Enterprise Linux / Centos
Installing packages
Here is an example for Zabbix server and web frontend with PostgreSQL database.
You need to have a database user with permissions to create database objects. The following shell
command will create a user zabbix. Specify a password when prompted and repeat the password
(note, you may first be asked for a sudo password):
Now we will set up the database zabbix (last parameter) with the previously created user as the
owner (-O zabbix) and import initial schema and data:
The above commands are provided as an example that will work in most GNU/Linux installations. You
can use different commands, e. g. psql -U <username> depending on how your system/database
is configured. If you have troubles setting up the database please consult your database
administrator.
Edit server host, name, user and password in zabbix_server.conf as follows, replacing
<username_password> with actual password of PostgreSQL user:
# vi /etc/zabbix/zabbix_server.conf
DBHost=
DBName=zabbix
DBUser=zabbix
DBPassword=<username_password>
You might want to keep default setting DBHost=localhost (or an IP address), but this would make
PostgreSQL use network socket connecting to Zabbix. See SELinux configuration block below for
instructions.
It's time to start Zabbix server process and make it start at system boot:
Apache configuration file for Zabbix frontend is located in /etc/httpd/conf.d/zabbix.conf. Some PHP
settings are already configured. But it's necessary to uncomment the “date.timezone” setting and set
the right timezone for you.
SELinux configuration
Having SELinux status enabled in enforcing mode, you need to execute the following command to
enable successful connection of Zabbix frontend to the server:
# setsebool -P httpd_can_connect_zabbix on
If any parameter such as “localhost” or an IP address is set for DBHost= in zabbix_server.conf, you
need to allow connection between Zabbix frontend and the database too:
# setsebool -P httpd_can_network_connect_db on
As frontend and SELinux configuration is done, you need to restart Apache web server:
Installing frontend
Now you are ready to proceed with frontend installation steps which will allow you to access your
newly installed Zabbix.
Zabbix official repository provides fping, iksemel, libssh2 packages for RHEL as well. These packages
are located in the non-supported directory.
Debian / Ubuntu
Installing packages
Example for Zabbix server and web frontend with PostgreSQL database.
You need to have database username user set up with permissions to create database objects.
Create Zabbix database on PostgreSQL with the following commands:
Edit server host, name, user and password in zabbix_server.conf as follows, replacing
<username_password> with actual password of PostgreSQL user:
# vi /etc/zabbix/zabbix_server.conf
DBHost=
DBName=zabbix
DBUser=zabbix
DBPassword=<username_password>
You might want to keep default setting DBHost=localhost (or an IP address), but this would make
PostgreSQL use network socket instead of UNIX socket connecting to Zabbix. If you also have SELinux
enabled in enforcing mode see SELinux configuration for instructions.
Now you may start Zabbix server process and make it start at system boot
Apache configuration file for Zabbix frontend is located in /etc/zabbix/apache.conf. Some PHP settings
are already configured. But it's necessary to uncomment the “date.timezone” setting and set the right
timezone for you.
Installing frontend
Now you are ready to proceed with frontend installation steps which will allow you to access your
newly installed Zabbix.
From:
https://www.zabbix.com/documentation/3.0/ - Zabbix Documentation 3.0
Permanent link:
https://www.zabbix.com/documentation/3.0/manual/installation/install_from_packages/server_installation_with_postgresql