I. Introduction of Linux Monitoring platform
These software are required for PHP environment support, using Apache PHP or Nginx php can, Nagios do not need to use MYSQL,CACTI and Zabbix is required to use MySQL
Second, Zabbix monitoring introduction
Zabbix Monitoring Flowchart
Third, installation Zabbix
Need to prepare two machines, one as Zabbix-server server, one as Zabbix-agent client
[Email protected] ~]# wget http://repo.zabbix.com/zabbix/3.2/rhel/7/x86_64/zabbix-release-3.2-1.el7.noarch.rpm
[Email protected] ~]# wget http://repo.zabbix.com/zabbix/3.2/rhel/7/x86_64/zabbix-release-3.2-1.el7.noarch.rpm
[[email protected] ~]# RPM-IVH zabbix-release-3.2-1.el7.noarch.rpm//actually installs a Yum source repository
[Email protected] ~]# RPM-IVH zabbix-release-3.2-1.el7.noarch.rpm
[[email protected] ~]# Cat/etc/yum.repos.d/zabbix.repo//This is actually the RPM package that was just installed
Zabbix-server server needs to install these packages
[[email protected] ~]# Yum install-y zabbix-agent zabbix-get zabbix-server-mysql zabbix-web zabbix-web-mysql//yum Install these packages
If MySQL has not been installed before and requires Yum to install or compile and install MySQL, please refer to the lamp chapter
[[Email protected] ~]# PS aux |grep mysql//check MySQL has no boot
[[email protected] ~]# systemctl start MySQL
If you encounter a startup error, you need to check the MySQL error log
[[email protected] ~]# Less/data/mysql/linux-01.err//View error, locate the problem
[[email protected] ~]# ls-l/data/mysql///Error reason may be/data/mysql/belong to the owner of the group is not mysql:mysql
[[email protected] ~]# vim/etc/my.cnf//Edit config file, add configuration
Add character_set_server = UTF8 in the first line of [mysqld], in order to better support the Web Chinese interface
[[email protected] ~]# systemctl restart MySQL//restart MySQL
[[email protected] ~]# mysql-uroot-p123456//Login to MySQL command line, create Zabbix Library
Mysql> CREATE database Zabbix character set UTF8; Specify encoding as UTF8
Mysql> Grant all on zabbix.* to ' Zabbix ' @ ' 127.0.0.1 ' identified by ' Aming-zabbix '; To create a user, is to let the PHP code to connect MySQL, and Zabbix-server start the premise is to be able to connect to MySQL, the client collects the data, it needs to pass the data to the server, the server needs to write data into MySQL, It involves which user to query, which library to write to, in the library there are related tables, so you need to set a user, this user has read and write permissions to the library
Mysql> quit
Import raw data, without this data, Zabbix no way to work, no way to show in the Web interface
[[email protected] ~]# cd/usr/share/doc/zabbix-server-mysql-3.2.11///zabbix a directory with data
[[email protected] zabbix-server-mysql-3.2.11]# ls
AUTHORS ChangeLog COPYING create.sql.gz NEWS README
[[email protected] zabbix-server-mysql-3.2.11]# gzip-d create.sql.gz//Unpacking create.sql.gz Pack
[[email protected] zabbix-server-mysql-3.2.11]# ls//Generate Create.sql file
AUTHORS ChangeLog COPYING create.sql NEWS README
[[email protected] zabbix-server-mysql-3.2.11]# mysql-uroot-p123456 Zabbix < create.sql//import into Zabbix library
[[email protected] ~]# systemctl start zabbix-server//Start Zabbix-server Service
Next, you need to start the httpd service, check before starting the Nginx service
[[Email protected] ~]# PS aux |grep nginx//If you start the Nginx service, first turn off Nginx service
[[email protected] ~]# systemctl start httpd//Start httpd service
[[email protected] ~]# Systemctl enable httpd//start-up required to join the service list
[[email protected] ~]# systemctl enable Zabbix-server//zabbix-server join boot start Service list
[[email protected] ~]# systemctl disable Nginx//disable Nginx boot
[[email protected] ~]# chkconfig nginx off
[[Email protected] ~]# PS aux |grep zabbix//view service side process there's no up
Linux Monitoring Platform Introduction Zabbix monitoring Introduction installation Zabbix forgot admin password how to do