Áú»¢¶Ä²©

This is the documentation page for an unsupported version of Áú»¢¶Ä²©.
Is this not what you were looking for? Switch to the current version or choose one from the drop-down menu.

3 Server installation with PostgreSQL database

Red Hat Enterprise Linux / CentOS

Installing packages

Here is an example for Áú»¢¶Ä²© server and web frontend with PostgreSQL database.

# yum install zabbix-server-pgsql zabbix-web-pgsql

Creating initial 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):

shell> sudo -u postgres createuser --pwprompt zabbix

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 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.

Database configuration for Áú»¢¶Ä²© server

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 Áú»¢¶Ä²©. See SELinux configuration block below for instructions.

Starting Áú»¢¶Ä²© server process

It's time to start Áú»¢¶Ä²© server process and make it start at system boot:

# systemctl start zabbix-server
       # systemctl enable zabbix-server

PHP configuration for Áú»¢¶Ä²© frontend

Apache configuration file for Áú»¢¶Ä²© 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 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

SELinux configuration

Having SELinux status enabled in enforcing mode, you need to execute the following command to enable successful connection of Áú»¢¶Ä²© 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 Áú»¢¶Ä²© 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:

# systemctl start httpd

Installing frontend

Now you are ready to proceed with frontend installation steps which will allow you to access your newly installed Áú»¢¶Ä²©.

Áú»¢¶Ä²© official repository provides fping, iksemel, libssh2 packages for RHEL as well. These packages are located in the directory.


Debian / Ubuntu

Installing packages

Example for Áú»¢¶Ä²© server and web frontend with PostgreSQL database.

# apt-get install zabbix-server-pgsql zabbix-frontend-php

Creating initial database

You need to have database username user set up with permissions to create database objects.
Create Áú»¢¶Ä²© database on PostgreSQL with the following commands:

shell> psql -U <username>
       psql> create database zabbix; 
       psql> \q 

Then import initial schema and data:

# zcat /usr/share/doc/zabbix-server-pgsql/create.sql.gz | psql -U <username> zabbix

Database configuration for Áú»¢¶Ä²© server

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 Áú»¢¶Ä²©. If you also have SELinux enabled in enforcing mode see SELinux configuration for instructions.

Starting Áú»¢¶Ä²© server process

Now you may start Áú»¢¶Ä²© server process and make it start at system boot

# service zabbix-server start
       # update-rc.d zabbix-server enable

PHP configuration for Áú»¢¶Ä²© frontend

Apache configuration file for Áú»¢¶Ä²© 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 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:

# service apache2 restart

Installing frontend

Now you are ready to proceed with frontend installation steps which will allow you to access your newly installed Áú»¢¶Ä²©.