Funo aka blog Funo aka blog

Funo aka
Yearning for freedom and hard life

Zabbix| installation, deployment, cluster

Experimental environment:

System: CnetOS 72 core 4G

Platform: Vagrant+LNMP


 Server:, install configuration LNMP and zabbix-server service server:, install zabbix-agent, monitor server


1. turn off the firewall and turn on the boot.

 Systemctl stop firewalld.service
# systemctl disable firewalld.service

2. close the SELinux security mechanism.

(1) temporary closure

 Setenforce 0

(2) permanent closure

 VIM /etc/selinux/config
 set SELINUX=enforcing to SELINUX=disabled

3. install LNMP environment

 WGet -cO lnmp1.6.tar.gz & Tar zxf lnmp1.6.tar.gz & CD lnmp1.6 & LNMP_Auto= "Y" LNMP_Auto= "3", "5", "5", "1".

On the official website of LNMP, it was generated by unattended tools.

 MySQL5.6 PHP5.6 database root password: vagrant

4. install ZABBIX Server

(1) install the repository configuration package.

 RPM -Uvh

(2) install Zabbix server, Web front-end, agent

 Yum -y install zabbix-server-mysql zabbix-web-mysql zabbix-agent

(3) create an initial database.

 MySQL -uroot -p
password -p
password login database password vagrant
mysql> create database ZABBIX character set utf8 collate collate;

(4) importing the initial schema and data, the system will prompt you to enter the newly created password.

 Zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz MySQL -uzabbix -p ZABBIX

In the current directory, the following instructions are used to import data. The time may be longer. Please wait patiently.

(5) configuring database for Zabbix server

 1. enter the document 

vim /etc/zabbix/zabbix_server.conf

2. edit file, modify the following 

DBHost= / / database host 
DBName=zabbix / / database name 
DBUser=zabbix / / login database user name 
DBPassword=vagrant / / login database password 

(6) configure the PHP configuration of the ZABBIX front-end to modify the time zone.

 1. enter the file 

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

2. to modify the time zone 

php_value date.timezone Asia/Shanghai

(7) start zabbix-server services and httpd services.

 Systemctl start zabbix-server zabbix-server startup zabbix-server service 
systemctl status zabbix-server zabbix-server to view zabbix-server service status 
systemctl enable zabbix-server enable, set up boot service, enable, and start up server server.

(8) web installation of ZABBIX

 Reference address:

Install zabbix-agent service in another server

(9) install zabbix-agent

 RPM -ivh

yum install zabbix-agent

(10) configure zabbix-agent services

 1. enter the file 

vim /etc/zabbix/zabbix_agentd.conf

2. to modify the following items: 

Server= //zabbix server host 
ServerActive= //zabbix agent host 
Hostname= //zabbix agent host name

(11) start zabbix-agent services.

 Systemctl start zabbix-agent / / start service 
systemctl status zabbix-agent / / view state

(12) add the configured zabbix-agent to the host in the ZABBIX web page.

 Configure > host > > create host: fill in host
This article is written by Funo aka. The address is:

Use Knowledge sharing signature 3 The international license agreement is licensed. In addition to the reprint / provenance, all originals or translations of this site must be signed before retransmission.

Comment: Rob sofa

    Nickname (required)
  • Mailbox (required)
  • Website