Jump to content

Install Zabbix on CentOS 7



Ran into a ton of issues using Cacti (mainly no one really supports the templates, plugins, etc for F5) so I'm trying a different flavor of monitoring solution called Zabbix which is another open source monitoring solution that has a few articles referencing F5 and a lot of the articles I'm finding are more recent (2017 and newer) where Cacti was pre 2017.

So let's start with some instructions

Install the Zabbix Repository

Download the RPM

wget https://repo.zabbix.com/zabbix/4.4/rhel/7/x86_64/zabbix-release-4.4-1.el7.noarch.rpm --no-check-certificate

Install the RPM

rpm -Uvh zabbix-release-4.4-1.el7.noarch.rpm

No longer will PHP 5.x work..  which I had to downgrade my box to PHP 5 for Cacit but Zabbix wants PHP 7.2 or newer so we need to do some work here.  NOTE: this will probably break Cacti if you have it running

Disable PHP 5 repositories

yum-config-manager --disable remi-php54

Enable PHP 7.2 repo.

yum-config-manager --enable remi-php72

Clean up yum

yum clean all

Install PHP

yum install -y php php-pear php-cgi php-common php-mbstring php-snmp php-gd php-pecl-mysql php-xml php-mysql php-gettext php-bcmath

Modify the PHP time Zone by editing the php.ini file.

vim /etc/php.ini

Uncomment the following line and add your time zone (note: if you already had php configured like I did for Cacti, even with an older version, then this is probably already set for you)

date.timezone = America/Detroit

Install MariaDB

Check to see if you have mariadb installed

mysql -u root -p

(if you get prompt to Enter password then its installed and you don't need to do this)

If you don't have mariadb installed on your server then run the following command.

yum --enablerepo=remi install mariadb-server

Start the MariaDB service.

systemctl start mariadb.service

Enable MariaDB on system boot.

systemctl enable mariadb

Run the following command to secure MariaDB.


Add a new root password and continue. Then it will ask a few questions. Type “Y” to agree to that.

Configure Database for Zabbix

Create a the zabbix database

mysql -u root -p
create database zabbix character set utf8 collate utf8_bin;
create user 'zabbixuser'@'localhost' identified BY 'OMGsup3Rs3cret!!';
grant all privileges on zabbix.* to zabbixuser@localhost identified by 'OMGsup3Rs3cret!!';
flush privileges;

On Zabbix server host import initial schema and data. You will be prompted to enter your newly created password.

cd /usr/share/doc/zabbix-server-mysql-4.4.6/

Import the MySQL file

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

Configure the database for Zabbix server

vim /etc/zabbix/zabbix_server.conf

Modify the following parameters


Then save and exit the file. Restart Zabbix service.

systemctl status zabbix-server.service

Enable Zabbix on system boot.

systemctl enable zabbix-server.service

Modify firewall rules.

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

Now restart httpd service.

systemctl restart httpd

Install Zabbix and any needed dependencies

Use YUM to install Zabbix server, frontend and agent

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

Configure Zabbix

Update the Time Zone

vim /etc/httpd/conf.d/zabbix.conf

Uncomment php_value date.timezone and add your correct timezone (for me its America/Detroit)

Restart HTTPD service

systemctl restart httpd.service

Setup Zabbix

You can access Zabbix using following URL:

http://Server-Host-Name Or IP /zabbix/

You should see the welcome page.

The default login name is “Admin” and password is “zabbix”. You will go to the Zabbix Dashboard.

YES the user and password are case sensitive so please remember to use a capital A for Admin


Recommended Comments

There are no comments to display.

Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...