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:
shell> sudo -u postgres createdb -O zabbix -E Unicode -T template0 zabbix
shell> zcat /usr/share/doc/zabbix-server-pgsql/create.sql.gz | sudo -u zabbix psql zabbix
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.
php_value max_execution_time 300
php_value memory_limit 128M
php_value post_max_size 16M
php_value upload_max_filesize 2M
php_value max_input_time 300
php_value always_populate_raw_post_data -1
# php_value date.timezone Europe/Riga
Having SELinux status enabled in enforcing mode, you need to execute the following command to enable successful connection of Zabbix frontend to the server:
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:
As frontend and SELinux configuration is done, you need to restart Apache web server:
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.
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:
Then import initial schema and data:
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.
php_value max_execution_time 300
php_value memory_limit 128M
php_value post_max_size 16M
php_value upload_max_filesize 2M
php_value max_input_time 300
php_value always_populate_raw_post_data -1
# php_value date.timezone Europe/Riga
As frontend is configured, you need to restart Apache web server:
Now you are ready to proceed with frontend installation steps which will allow you to access your newly installed Zabbix.