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

Framework:

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

Start

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 http://soft.vpser.net/lnmp/lnmp1.6.tar.gz -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 https://mirrors.tuna.tsinghua.edu.cn/zabbix/zabbix/4.0/rhel/7/x86_64/zabbix-release-4.0-2.el7.noarch.rpm

(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=127.0.0.1 / / database host 
DBName=zabbix / / database name 
DBUser=zabbix / / login database user name 
DBPassword=vagrant / / login database password 
ListenIP= 127.0.0.1

(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: https://www.zabbix.com/documentation/4.0/manual/installation/install#installing_frontend

Install zabbix-agent service in another server

(9) install zabbix-agent

 RPM -ivh https://repo.zabbix.com/zabbix/4.0/rhel/7/x86_64/zabbix-agent-4.0.9-3.el7.x86_64.rpm

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=10.16.8.97 //zabbix server host 
ServerActive=10.16.8.98 //zabbix agent host 
Hostname=10.16.8.98 //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 192.168.2.12 host
This article is written by Funo aka. The address is: https://blog.suyc.cn/index.php/archives/175.html

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