No. afka blog No. afka blog

Forrest ACA
Yearning for freedom and hard life~

ZABBIX | install | deploy | cluster

Experimental environment: 1

System: cnetos 7 2 core 4G

Platform: vagrant + LNMP

framework:

 Server: 192.168.2.11, install and configure LNMP and ZABBIX server service 
 server: 192.168.2.12, install ZABBIX agent to monitor the server

Start

1. Turn off the firewall and turn off the boot

 # systemctl stop firewalld.service
# systemctl disable firewalld.service

2. Turn off 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" DBSelect="3" DB_ Root_ Password="vagrant" InstallInnodb="y" PHPSelect="5" SelectMalloc="1" ./install.sh lnmp

It is generated by unattended tools on the LNMP official website, specifically as follows:

 MySQL 5.6 php5.6 database root password: vagrant

4. Install ZABBIX server

(1) Install 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 and agent

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

(3) Create initial database

 #Log in to MySQL database_ Log in to MySQL password;

(4) The initial password and the system will prompt you to enter the new schema.

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

Execute the following instructions in the current directory for data import. It may take a long time. Please wait patiently

(5) Configure database for ZABBIX server

 Enter / etc / bbix_ Edit the file and modify the following items: 
 dbhost = 127.0.0.1 / / database host 
 dbname = ZABBIX / / database name 
 dbuser = ZABBIX / / user name of database 
 dbpassword = vagrant / / password of logging in database 
 listenip = 127.0.0.1

(6) Configure the PHP configuration of ZABBIX front end and modify the time zone

 1. Enter the file 
 VIM / etc / httpd / conf.d/zabbix.conf 
 2. Modify the time zone 
 PHP_ value date.timezone Asia/Shanghai

(7) Start ZABBIX server service and httpd service

 Start zabbix-server ා start zabbix-server ා start zabbix-server \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\enablehttpd ා sets the httpd boot service

(8) Web installation of ZABBIX

 Reference address: https://www.zabbix.com/documentation/4.0/manual/installation/install#installing_ frontend

Install and configure the ZABBIX agent service on 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 service

 1. Enter the file 
 VIM / etc / ZABBIX / ZABBIX_ Modify the following 
 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 the ZABBIX agent service

 Systemctl start ZABBIX agent / / start the service 
 systemctl status ZABBIX agent / / view the status

(12) In the ZABBIX web page, add the configured ZABBIX agent to the host

 Configuration > host > create host: fill in 192.168.2.12 host
This article is written by fufoulka. The address is: http://blog.suyc.cn/index.php/archives/175.html

use Knowledge sharing signature 3.0 International license agreement. Except for the reprint / source, they are all original or translated by our website. Please sign before reprinting.

Comment: Grab the sofa

    Nickname (required)
  • Email address (required)
  • website