1.Zabbix Introduction
Zabbix is an enterprise-class open source distributed monitoring solution, which is continuously maintained by a foreign team, the software can be freely downloaded and used, and the operation team will profit by providing the technical support of the charge; http://www.zabbix.com/documentation/2.0/ Manual/quickstart. Zabbix through the C/S mode to collect data, through the B/S mode in the Web-side display and configuration, is a Web-based interface to provide distributed system monitoring and network monitoring functions of enterprise-level open source software, mainly composed of 2 parts, zabbixserver and optional Components Zabbix Agent The installation of Zabbix is mainly the RPM package and the source package compiled and installed two ways.
2.Zabbix Operating conditions:
Server:zabbix server needs to run in a lamp (linux+apache+mysql+php) environment with low hardware requirements.
Agent: The existing agent basically supports the common OS in the market, including Linux, HPUX, Solaris, Sun, Windows.
SNMP: Support for various common network devices
3.Zabbix function
With common business monitoring software features (host performance monitoring, network equipment performance monitoring, database performance monitoring, FTP and other general protocol monitoring, a variety of alarm methods, detailed report chart drawing) to support the automatic discovery of network devices and servers, support for distributed, centralized display, management of distributed monitoring points , extensibility, Server provides a common interface, you can develop and improve all kinds of monitoring.
4. Advantages: Open source, no software cost input; server is low on device performance (actual test environment: virtual machine centos5,2gcpu 1G memory, monitoring 5 devices, CPU usage is basically below 10%, memory remaining 400M or more); Support for distributed centralized management Open interface, strong extensibility, mainly in the operation and maintenance of hardware or application monitoring cases more.
5. Disadvantages: Dynamic monitoring composition module can not be flexibly added to delete, the composition granularity is not enough, the function module is too scattered, the data is not updated in real time, alarm delay.
Note: The deployment environment for this article: CentOS Linux release 7.2.1511 (Core)
Zabbix Package: zabbix-2.2.7.tar.gz
6. Start Deployment Zabbix:
[Email protected] ~]# Useradd Zabbix
Upload Zabbix package to Zabbix user's home directory, this is easy to manage
Unzip the Zabbix package:
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M02/7F/FD/wKiom1czVWDApulrAABLeMSdnvw872.png "title=" Zabbix1.png "alt=" Wkiom1czvwdapulraablemsdnvw872.png "/>
7. Switch to root to create the Zabbix installation path, Zabbix do not have permission to create the directory.
[Email protected] ~]# Mkdir/usr/local/zabbix
[Email protected] ~]# Chown zabbix:zabbix/usr/local/zabbix/-R
8. Compile and install the ZABBIX environment:
[Email protected] zabbix-2.2.7]$/configure--prefix=/usr/local/zabbix--sbindir=/usr/local/zabbix/sbin-- sysconfdir=/usr/local/zabbix/etc/--with-mysql--with-net-snmp--with-libcurl--enable-server--enable-agent-- Enable-proxy--prefix=/usr/local/zabbix
Compile error: (e.g.)
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/7F/FA/wKioL1czVuuTvpJCAACDKjSYXzs501.png "title=" Zabbix2.png "alt=" Wkiol1czvuutvpjcaacdkjsyxzs501.png "/>
Workaround:
Go back to root User Install compilation tool GCC and make
[email protected] ~]# Yum install gcc make-y
9. Cut back Zabbix user to continue compiling: (Error)
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/7F/FA/wKioL1czV1Dif3SvAAA_gxZh7AQ982.png "title=" Zabbix3.png "alt=" Wkiol1czv1dif3svaaa_gxzh7aq982.png "/>
Workaround:
Install MARIADB and view its version
[Email protected] ~]# yum-y install mariadb mariadb-server
[Email protected] ~]# systemctl start mariadb #启动mysql
[Email protected] ~]# Systemctl enable MARIADB #设置开机自启动
Created symlink From/etc/systemd/system/multi-user.target.wants/mariadb.service to/usr/lib/systemd/system/ Mariadb.service.
10. Cut back Zabbix user to continue compiling: (Error)
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/7F/FA/wKioL1czV8WSFb6OAAA4O1SSphc274.png "title=" Zabbix4.png "alt=" Wkiol1czv8wsfb6oaaa4o1ssphc274.png "/>
Workaround:
[email protected] ~]# Yum install net-snmp-devel-y
11. Cut back Zabbix user to continue compiling: (Error)
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M00/7F/FA/wKioL1czWN6QMLFqAAAhw01TFUA809.png "title=" Zabbix5.png "alt=" Wkiol1czwn6qmlfqaaahw01tfua809.png "/>
Workaround:
Yum Install Curl Curl-devel
12. Cut back Zabbix user to continue compiling:
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M02/80/05/wKioL1c0xCbzk8pZAAAkk3Mb_eM096.png "title=" Zabbix6.png "alt=" Wkiol1c0xcbzk8pzaaakk3mb_em096.png "/>
[[Email protected]lhost zabbix-2.2.7]$ make && make install
The compile and install work to this Zabbix is complete.
13. Configure the Zabbix MySQL database:
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/80/08/wKiom1c0xDDgXZgVAACgy3WEnqc515.png "title=" Zabbix7.png "alt=" Wkiom1c0xddgxzgvaacgy3wenqc515.png "/>
14. Import the Zabbix SQL statement to the MySQL database:
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M01/80/08/wKiom1c0xG2BolpAAAA_uig4wSw717.png "title=" Zabbix8.png "alt=" Wkiom1c0xg2bolpaaaa_uig4wsw717.png "/>
[Email protected] ~]# systemctl restart mariadb #重新启动mysql
15. Modify Zabbix_server.conf
Dbpassword must be configured, the database name and the user use the default, without configuration.
DBName: Database name (default is Zabbix)
DBUser: User name of the connection database (default is Zabbix)
Dbpassword: Password to connect to the database
Dbname=zabbix
Dbuser=zabbix
dbpassword=123456
[Email protected] etc]$/usr/local/zabbix/sbin/zabbix_server #启动zabbix服务
16. Install the Zabbix Web service:
[email protected] ~]# Yum install httpd-y
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M02/80/08/wKiom1c0xonzkkPWAAApYm51LbE808.png "title=" 11.png "alt=" Wkiom1c0xonzkkpwaaapym51lbe808.png "/>
[Email protected] ~]# systemctl start Httpd.service
17. Browser Access Zabbix:
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M01/80/08/wKiom1c0yCLS10N0AAKSZWmhVAs978.png "title=" Zabbix10.png "alt=" Wkiom1c0ycls10n0aakszwmhvas978.png "/>
18. Page error such as:
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M02/80/05/wKioL1c0yUOivWfTAAHVAkV9Foc751.png "title=" Zabbix11.png "alt=" Wkiol1c0yuoivwftaahvakv9foc751.png "/>
Workaround:
[[email protected] ~]# Yum install PHP
[Email protected] ~]# Vim/etc/php.ini
Date.timezone = Asia/shanghai
Post_max_size = 16M
Max_execution_time = 300
Max_input_time = 300
19. Page error such as:
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/80/08/wKiom1c0yYizclZlAAHn5KYfxCE322.png "title=" Zabbix12.png "alt=" Wkiom1c0yyizclzlaahn5kyfxce322.png "/>
Workaround:
[[Email protected] ~] #yum install PHP-GD php-mysql php-bcmath php-mbstring php-xm php-pear
20.zabbix Accessing the database:
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M00/80/05/wKioL1c0yu3Cb0oKAAHixAnxCwk897.png "title=" Zabbix14.png "alt=" Wkiol1c0yu3cb0okaahixanxcwk897.png "/>
21.zabbix_server's information:
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M01/80/08/wKiom1c0ymryPGTcAAGhwC3i2X4408.png "title=" Zabbix15.png "alt=" Wkiom1c0ymrypgtcaaghwc3i2x4408.png "/>
22. Confirmation of the above information:
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M01/80/05/wKioL1c0y33yN6IqAAHjQ6oW9KI199.png "title=" Zabbix16.png "alt=" Wkiol1c0y33yn6iqaahjq6ow9ki199.png "/>
23.zabbix Web is dynamically rendered in PHP and needs to download this file:
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/80/08/wKiom1c0yuzA_EDmAAHif8fIVIQ710.png "title=" Zabbix17.png "alt=" Wkiom1c0yuza_edmaahif8fiviq710.png "/>
24. Upload to the above path and reload the Web service:
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M01/80/05/wKioL1c0zCSRCqHQAADPsh7dTeg935.png "title=" Zabbix18.png "alt=" Wkiol1c0zcsrcqhqaadpsh7dteg935.png "/>
25. Configuration Complete:
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M00/80/05/wKioL1c0zFGxrgoYAAG3ifrtnAk310.png "title=" Zabbix19.png "alt=" Wkiol1c0zfgxrgoyaag3ifrtnak310.png "/>
26. Login Zabbix Page: (Note: case)
Username:admin (default)
Password:zabbix (default)
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M01/80/05/wKioL1c0zH7B0NUgAAHMR9NxpCE627.png "title=" Zabbix20.png "alt=" Wkiol1c0zh7b0nugaahmr9nxpce627.png "/>
This article is from the "LINUX Super Dream" blog, make sure to keep this source http://215687833.blog.51cto.com/6724358/1772897
"Zabbix Installation and Deployment"-CENTOS7