Zabbix monitoring installation and configuration
Zabbix Introduction
Open source web-based software, open source monitoring system status can also monitor network equipment.
Unlike Nagios, Zabbix will keep the acquired data in the database, so Zabbix needs to have database support
Zabbix you can also automatically discover hosts and network devices
Support Email and SMS alerts
Zabbix Most configurations can be done in the Web interface configuration
Platform: CentOS 6 x64
Lamp Environment
1.installation of Zabbix server
RPM-IVH http://www.lishiming.net/data/attachment/forum/month_1211/epel-release-6-7.noarch.rpm
Note: a third-party Epel is required to install the Zabbix package, and CentOS does not have a Zabbix package in the Yum source
1-1 , install the RPM package of lamp environment to build:
Yum install-y httpd mysql mysql-libs php php-mysql mysql-server php-bcmath php-gdphp-mbstring
1-2 , install Zabbix server:
Yum install zabbix20 zabbix20-agentzabbix20-server zabbix20-server-mysqlzabbix20-web zabbix20-web-mysql Net-snmp-devel
1-3 , create Zabbix database, and Zabbix user authorization
Mysql-uroot-p-E "CREATE database Zabbix defaultcharacter set UTF8 collate utf8_general_ci"
# Create a Zabbix database and specify a character set of UTF8 to prevent web pages from garbled characters
Mysql-uroot-p-E "Grant all on zabbix.* to ' Zabbix ' @ ' localhost ' identified by ' Zabbix '
flushprivileges; # Refresh cache, take effect immediately
# Create a ZABBX user and password and give all permission operations to use the Zabbix database
1-4 , sequentially import Zabbix three databases installed in the/usr/share/zabbix-mysql directory
Mysql-uroot-p Zabbix </usr/share/zabbix-mysql/schema.sql
Mysql-uroot-p Zabbix </usr/share/zabbix-mysql/images.sql
Mysql-uroot-p Zabbix </usr/share/zabbix-mysql/data.sql
1-5 , modify zabbix_server.conf
Vim/etc/zabbix/zabbix_server.conf
Dbpassword=zabbix #zabbix password for database user
1-6 , modify the php.ini configuration file to meet Zabbix installation requirements
Sed-i ' s/^\ (. *\) post_max_size =.*$/post_max_size = 16m/g '/etc/php.ini
Sed-i ' s/^\ (. *\) Max_execution_time =.*$/max_execution_time = 300/g '/etc/php.ini
Sed-i ' s/^\ (. *\) Max_input_time =.*$/max_input_time = 300/g '/etc/php.ini
Modify the PHP time function to the Chinese time zone:
Sed-i ' s/;d ate.timezone.*/date.timezone = prc/g '/etc/php.ini
1-8 , modifying the zabbix_server.conf configuration file
Dbuser=zabbix #zabbix Access users of the database
Dbpassword=zabbix #zabbix password for access to the database
1-7 , start Zabbix services and HTTPD/MYSQLD services
/etc/init.d/zabbix-serverstart; /etc/init.d/zabbix-agent start
/etc/init.d/httpdstart; /etc/init.d/mysqld start
Set up the above services for system boot operation
2 , Web installation Zabbix
browser access to Http://ip/zabbix, input MySQL related information, first to test, if not passed, then need to debug, test pass, click Next à Name (can be customized) point next, click Next, Finish the last point
Default Administrator account is Admin:zabbix
3 , access to the host to monitor
On the client, yum install Zabbix20-agent
Vim/etc/zabbix_agentd.conf
// change server= server IP; serveractive=0.0.0.0:10050; Hostname=centos ( Custom, but unique)
Start Client/etc/init.d/zabbix-agent start
Command-line test on the server: Zabbix_get-s client ip-p10050-k "System.hostname"
This article is from the "Boyhack" blog, make sure to keep this source http://461205160.blog.51cto.com/274918/1741083
Zabbix Monitoring Installation and configuration