Zabbix installation for CentOS 7

CentOS 7 Zabbix installation guide with mysql database.

Install mariadb for backend database

yum install mariadb mariadb-server

Add the zabbix repo:

rpm -i

install zabbix server with web and agent.

yum install zabbix-server-mysql zabbix-web-mysql zabbix-agent

Start and enable mariadb

systemctl start mariadb
systemctl enable mariadb

Run the mysql_secure_installation script


After a clean installation the root password is empty so just press enter when asked for mariadb root password. After creating a password for mariadb root you should be fine by using the default choices.

Start mysql client and run the mysql commands

mysql -u root -p
MariaDB> create database zabbix character set utf8 collate utf8_bin;
MariaDB> grant all privileges on zabbix.* to zabbix@localhost identified by 'yourpasswordhere';

Exit out of mysql client, run the following command, and input the password you chose in the previous command.

zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -u zabbix -p zabbix

Edit /etc/zabbix/zabbix_server.conf and add your database password to the DBPassword field


Start all zabbix processes and enable them on startup.

systemctl restart zabbix-server zabbix-agent httpd
systemctl enable zabbix-server zabbix-agent httpd

On my first test selinux made zabbix-server fail with last error in logs being”cannot disable core dump, exiting…”. I made selinux permissive for now to continue.

Add your timezone to /etc/httpd/conf.d/zabbix.conf by uncommenting the following line and replacing it with your timezone.

# php_value date.timezone Europe/Helsinki

You can then follow zabbix quickstart guide since zabbix should be properly up and running on http://zabbixServerIP/zabbix

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.