Zabbix is an Enterprise-class network monitoring solution developed and maintained by Zabbix SIA.
Zabbix is an extremely platform capable of monitoring hundreds of thousands of devices at absolutely FREE of cost. Whether you have a small network environment with a handful of servers or a large corporation with a multitude of server nodes, Zabbix is a perfect choice, adaptable to any needs.
In this guide, we are going to see how to install Zabbix 4.0 LTS on a CentOS 7 server.
Although Zabbix can be deployed inside a network environment, it is a best practice to deploy it outside the monitored environment. This way Zabbix can keep monitoring even during any local issue. This is true especially for an environment where there are no on-site monitoring team or IT staff available. Zabbix can be easily deployed using a Virtual Private Server or VPS as offered by Symmcom at an extremely competitive price.
Step 1: Install Zabbix
Add the Zabbix Repository using the following command:
Install Zabbix server, web frontend and agent:
$ yum install zabbix-server-mysql zabbix-web-mysql zabbix-agent
Step 2: Prepare Database
Zabbix heavily depends on storing collected data into a database. In this guide, we are going to use MariaDB to store Zabbix data. If you do not have MariaDB server configured yet, follow our guide How To Install MariaDB 10.1 on CentOS 7 to quickly configure one.
Once you have MariaDB database server configured, we will now create a database for Zabbix and grant permission to a user.
$ mysql -u root -p
mysql> create database zabbix_db character set utf8 collate utf8_bin;
mysql> grant all privileges on zabbix_db.* to [email protected] identified by 'password';
Zabbix installer comes with initial database schema and data in a compressed file. We are now going to populate the Zabbix database we created earlier using this file.
$ zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -u zabbix_usr -p zabbix_db
Step 3: Configure PHP for Zabbix
Uncomment the following line in /etc/httpd/conf.d/zabbix.conf and change according to your preferred TimeZone:
$ php_value date.timezone Europe/Riga
Step 4: Start Zabbix processes
Enable Zabbix processes so they auto starts during a reboot and start all the processes:
$ systemctl restart zabbix-server zabbix-agent httpd
$ systemctl enable zabbix-server zabbix-agent httpd
Step 5: Enable SSL for Web Frontend
Since SSL is not enabled by default on a cleanly installed web server, we are now going to configure and enable it so we can access the Zabbix web frontend securely. You can create a self-signed SSL certificate or use already purchased one.
Step 6: Setup Zabbix Web Frontend
At this stage, we are now ready to configure Zabbix Graphical User Interface. This step can be fully completed through a web browser.
Step 6a: Access Zabbix Web
Zabbix Web Frontend can be access from https://<ip_or_domain>/zabbix. If Zabbix installation went successfully, we will see the welcome page as following. Click Next to proceed.
Step 6b: Check Prerequisites
Check that all requirements are met. This page shows the configurations required by Zabbix and currently configured values. Click Next Step only if everything looks good. If not go back to the console and install any missing components.
Step 6c: Connect Database
In this page, we need to enter information to access the database where Zabbix will store collected data. Zabbix can work with both locally installed database or use a database cluster where the database is stored elsewhere outside the Zabbix server. If that is the case, enter the host IP or hostname as
Database Host. If using the local database then enter the user credentials we created in Step 2 otherwise use the credentials provided by the database cluster administrator. Click Next step when done.
Step 6d: Zabbix Server Details
In this page enter the port number and name for the Zabbix server. By default, Zabbix uses port 10051 to listen. Typing in the name is optional. But anything entered here will show up in the Zabbix menu and Frontend page titles. So giving the Zabbix server a name is recommended. Click Next step.
Step 6e: Summary
This page shows all information collected thus far to finish installing the Zabbix frontend. If all looks good, click Next step.
Step 6f: Finish Installation
If all went ok, this page should show the Finish button which will conclude the entire Zabbix installation process.
Step 6g: Access Zabbix Frontend
After successful installation, Zabbix will come back to the login page automatically. If it does not, simply go to the frontend using URL https://<ip_or_hostname>/zabbix. The default username for Zabbix is Admin with capital A and password is zabbix.