How to install Zabbix server on Centos 7
Zabbix is an enterprise-class open source distributed monitoring solution that can be used to monitor and track performance and availability of network servers, devices and other IT resources. It supports distributed and WEB monitoring, auto-discovery, and more.
Before installing Zabbix, we should have installed and configured LAMP stack. To install and configure LAMP server On CentOS 7, refer to the following link:
Install Zabbix Server
Install and configure Zabbix server for your platform:
1. Install Zabbix repository
# rpm -Uvh https://repo.zabbix.com/zabbix/5.2/rhel/8/x86_64/zabbix-release-5.2-1.el8.noarch.rpm # dnf clean all
2. Install Zabbix server, frontend, agent
# dnf install zabbix-server-mysql zabbix-web-mysql zabbix-apache-conf zabbix-agent
3. Create initial database
Make sure you have the database server up and running.
Run the following on your database host.
# mysql -uroot -p password mysql> create database zabbix character set utf8 collate utf8_bin; mysql> create user [email protected] identified by 'password'; mysql> grant all privileges on zabbix.* to [email protected]; mysql> quit;
On Zabbix server host, import the initial schema and data. You will be prompted to enter your newly created password.
# zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -p zabbix
4. Configure the database for Zabbix server
Edit file /etc/zabbix/zabbix_server.conf
5. Start Zabbix server and agent processes
Start Zabbix server and agent processes and make it start at system boot.
# systemctl restart zabbix-server zabbix-agent httpd php-fpm # systemctl enable zabbix-server zabbix-agent httpd php-fpm
6. Configure Zabbix frontend
Connect to your newly installed Zabbix frontend: http://server_ip_or_name/zabbix
Next, Zabbix will run through a list of pre-requisites. You should see all OK statuses as you scroll down the list. At this point, you will see if the edits you made earlier are correct. If they are not, the setup wizard will not proceed until you make the corrections in your configuration files. If everything is correct and documented, click on Next step:
Now supply the database connection info to the web front end. Be sure to change the Database Port (if you did not use the default MySQL port 3306) and enter the database user password you configured when setting up the Zabbix database. If everything is correct and documented, click on Next step:
Lastly, give the Zabbix server a Name and leave the default values for Host and Port. Any name will work, this is just a way to label your Zabbix server in the Zabbix UI. As a best practice though, try to use the actual hostname of your server. When satisfied, click on Next step: