Operating System: CentOS Mini 6.5
Yum install httpd. x86_64 httpd-manual.x86_64 php-xml php-mbstring mysql-server.x86_64 mysql. x86_64 php-mysql.x86_64 php. x86_64 php-bcmath.x86_64 php-gd.x86_64 mysql-devel.x86_64 curl-devel gcc. x86_64 libgcc. x86_64 make net-snmp.x86_64 net-snmp-devel.x86_64 net-snmp-utils.x86_64 wget ntp vim
Here we need two Y
Ntpdate 202.120.2.101
Date; hwclock-w
Sed-I "s/# ServerName www.example.com: 80/ServerName localhost: 80/g"/etc/httpd/conf/httpd. conf
Service httpd restart
Service mysqld start
Mysqladmin-uroot-p password mysql password (there is a space between it and password)
Here we need a carriage return.
Chkconfig -- add httpd
Chkconfig -- level 345 httpd on
Chkconfig -- add mysqld
Chkconfig -- level 345 mysqld on
Wget http://jaist.dl.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/2.2.0/zabbix-2.2.0.tar.gz
(The tar package can also be changed to another version. The installation method is the same. If the tar package is changed, the directory below will be changed to the same name as the tar package)
Tar zxvf zabbix-2.2.0.tar.gz
Useradd-d/home/zabbix-p zabbix
Mysql-uroot-pmysql Password
Create database zabbix character set utf8;
Flush privileges;
Quit;
Mysql-uroot-p 'mysql password' zabbix </root/zabbix-2.2.0/database/mysql/schema. SQL
Mysql-uroot-p 'mysql password' zabbix </root/zabbix-2.2.0/database/mysql/images. SQL
Mysql-uroot-p 'mysql password' zabbix </root/zabbix-2.2.0/database/mysql/data. SQL
Cd zabbix-2.2.0
./Configure -- enable-server -- enable-agent -- with-mysql -- with-net-snmp -- with-libcurl -- enable-proxy
Make install
Echo "zabbix-agent 10050/tcp # Zabbix Agent">/etc/services
Echo "zabbix-agent 10050/udp # Zabbix Agent">/etc/services
Echo "zabbix-trapper 10051/tcp # Zabbix Trapper">/etc/services
Echo "zabbix-trapper 10051/udp # Zabbix Trapper">/etc/services
Wget http://www.fping.org/dist/fping-3.4.tar.gz
Gunzip fping-3.4.tar.gz
Tar xvf fping-3.4.tar
Cd fping-3.4
./Configure
Make install
Sed-I "s/# DBUser =/DBUser = root/g"/usr/local/etc/zabbix_server.conf
Sed-I "s/# DBPassword =/DBPassword = mysql password/g"/usr/local/etc/zabbix_server.conf
Sed-I "s/# FpingLocation \=\/usr \/sbin \/fping/FpingLocation \=\/usr \/local \/sbin \/fping/g "/ usr/local/etc/zabbix_server.conf
Cp-r/root/zabbix-2.2.0/frontends/php/*/var/www/html
Sed-I "s/max_execution_time = 30/max_execution_time = 300/g"/etc/php. ini
Sed-I "s/max_input_time = 60/max_input_time = 300/g"/etc/php. ini
Sed-I "s/post_max_size = 8 M/post_max_size = 16 M/g"/etc/php. ini
Sed-I "s/; date. timezone =/date. timezone = PRC/g"/etc/php. ini
Service httpd restart
/Usr/local/sbin/zabbix_server
/Usr/local/sbin/zabbix_agentd
Echo "/usr/local/sbin/zabbix_server">/etc/rc. local
Echo "/usr/local/sbin/zabbix_agentd">/etc/rc. local
Vim/var/www/html/conf/zabbix. conf. php (copy the following text to zabbix. conf. php)
<? Php
// Zabbix GUI configuration file
Global $ DB;
$ DB ['type'] = 'mysql ';
$ DB ['server'] = 'localhost ';
$ DB ['Port'] = '0 ';
$ DB ['database'] = 'zabbix ';
$ DB ['user'] = 'root ';
$ DB ['Password'] = 'mysql password ';
// SCHEMA is relevant only for IBM_DB2 database
$ DB ['scheme'] = '';
$ ZBX_SERVER = 'localhost ';
$ ZBX_SERVER_PORT = '123 ';
$ ZBX_SERVER_NAME = '';
$ IMAGE_FORMAT_DEFAULT = IMAGE_FORMAT_PNG;
?>
OK. You can log on to zabbix by entering the Server IP address in the browser. If you change the version, replace the tar package, others do not need to be modified, tested, this installation method is used in zabbix 2.0.X and 2.2.X versions, more information can refer to the https://www.zabbix.com/documentation
ZABBIX details: click here
ZABBIX: click here
Install and deploy the distributed monitoring system Zabbix 2.06
Install and deploy the distributed monitoring system Zabbix 2.06
Install and deploy Zabbix in CentOS 6.3
Zabbix distributed monitoring system practice
Under CentOS 6.3, Zabbix monitors apache server-status
Monitoring MySQL database Parameters Using Zabbix in CentOS 6.3