How To Install Zabbix 5 On CentOS 8

Zabbix 5 has a lot of GUI imrovment and other new features, notice the installation on CentOS 8 is a little different. lets start .

If you are a fan of SELinux you can set it to permissive mode :

setenforce 0 && sed -i 's/^SELINUX=.*/SELINUX=permissive/g' /etc/selinux/config

To disable just edit with #nano /etc/selinux/config

And set : SELINUX=disabled

Next install which is needed by zabbix 5

#dnf -y install

Then install zabbix

#rpm -Uvh
#dnf clean all
#dnf -y install zabbix-server-mysql zabbix-web-mysql zabbix-apache-conf zabbix-agent

Now we have to add mysql server = mariaDB

#dnf -y install mariadb-server && systemctl start mariadb && systemctl enable mariadb

configure the mysql server :


Create User & DB (notice the charset = utf8 which is required by zabbix 5)

#mysql -u root -p
create database zabbix_db character set utf8 collate utf8_bin;
grant all privileges on zabbix_db.* to zabbix_user@localhost identified by 'zabbix' ;
flush privileges;
show create database zabbix_db;     ->to make sure db is created O.K
Temporary disable strict mode (ZBX-16465) to avoid MySQL error “ERROR 1118 (42000) at line 1284: Row size too large (> 8126)” :
#mysql -uroot -p'your_password you set for mysql' zabbix_db -e "set global innodb_strict_mode='OFF';"
build database :
#zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix_user -p'zabbix' zabbix_db
re-enable stric mode:
#mysql -uroot -p'your_password you set for mysql' zabbix_db -e "set global innodb_strict_mode='ON';"

configure Zabbix for the database we have prepared for it :

#nano /etc/zabbix/zabbix_server.conf

Start zabbix

#systemctl restart zabbix-server zabbix-agent 
#systemctl enable zabbix-server zabbix-agent

Add firewall rules

#firewall-cmd --add-service={http,https} --permanent
#firewall-cmd --add-port={10051/tcp,10050/tcp} --permanent
#firewall-cmd --reload

Now lets start configure the web frontend

#nano /etc/php-fpm.d/zabbix.conf
php_value date.timezone Asia/Jerusalem

restart the website service :

#systemctl restart httpd php-fpm
#systemctl enable httpd php-fpm

Thats it ! Now open a browser and surf to

Enter this variables 
Database name : zabbix_db
user : zabbix_user
Password : zabbix

Now you are done! enjoy

Good Luck

Leave a Reply

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