System Information: system version: Centos6.5 64-bit
Server-Side ip:172.16.4.63
Server-Side ip:172.16.4.64
Zabbix version: zabbix-2.0.14.tar.gz
1. Install lamp environment
Install server side with Yum:
[email protected] ~]# Yum install gcc gcc-c++
[[email protected] ~]# yum install-y httpd mysql mysql-server mysql-devel php php-mysql php-common php-mbstring PHP-GD ph P-ODBC Php-xml Php-pe
[[Email protected] ~] #service httpd start (start httpd)
[[Email protected] ~] #service mysqld Start (start mysqld)
The following libraries are installed on both the server and the agent side:
Yum install-y Curl Curl-devel net-snmp net-snmp-devel perl-dbi
2. Download zabbix-2.0.14.tar.gz, download to official website
3. Create Useradd Zabbix server-side and agent-side user account
[email protected] ~]# useradd Zabbix; [Email protected] ~]# usermod-s/sbin/nologin Zabbix
4.Server Database configuration: Initialize Database--Create Zabbix database--Import Zabbix database
[Email protected] ~]# mysqladmin-u root password ' 123456 '
[[email protected] ~]# mysql-u root p
Mysql>create database Zabbix character set UTF8;
Mysql> Grant all on zabbix.* to [e-mail protected] identified by ' 123456 ';
mysql> use Zabbix;
Mysql> Source/root/zabbix-2.2.6/database/mysql/schema.sql
Mysql> Source/root/zabbix-2.2.6/database/mysql/images.sql
Mysql> Source/root/zabbix-2.2.6/database/mysql/data.sql
Mysql> exit
5.Server-terminal Compilation installation Zabbix
[[Email protected] ~] #cd/root/zabbix-2.0.14.tar.gz
[[email protected] zabbix-2.0.14] #tar zxvf zabbix-2.0.14
[Email protected] zabbix-2.0.14]#./configure-enable-server--enable-agent--with-mysql--WITH-NET-SNMP-- With-libcurl--prefix=/usr/local/zabbix
[[email protected] zabbix-2.0.14] #make Install
6. Configure the server side
[[Email protected] ~] #ln-S/usr/local/zabbix/sbin/zabbix_*/usr/local/sbin/
[[Email protected] ~] #vi/usr/local/zabbix/etc/zabbix_server.conf Modify Add the following:
Logfile=/tmp/zabbix_server.log
Dbhost=localhost
Dbname=zabbix
Dbuser=zabbix
dbpassword=123456
Copy the script and start:
[[Email protected] ~] #cd/root/zabbix-2.0.14
[email protected] zabbix-2.0.14]# CP misc/init.d/tru64/zabbix_server/etc/init.d/
[Email protected] zabbix-2.0.14]# cp-a frontends/php/*/var/www/html/
[Email protected] zabbix-2.0.14]# sed-i '/date.timezone/i date.timezone = PRC '/etc/php.ini
[[email protected] zabbix-2.0.14] #chmod +x/etc/init.d/zabbix_server
[[email protected] zabbix-2.0.14] #vi/etc/init.d/zabbix_server Add the following:
#!/bin/sh
#chkconfig: 35 95 95
#description: Zabbix Agent Server
Add Service:
[[email protected] zabbix-2.0.14] #chkconfig add zabbix_server
Boot auto Start:
[[email protected] zabbix-2.0.14] #chkconfig zabbix_server on
Start the service:
[[email protected] zabbix-2.0.14]#/etc/init.d/zabbix_server start
To see if the service started successfully:
[[email protected] zabbix-2.0.14] #ps EF |grep Zabbix
Zabbix 19719 1 0 05:43? 00:00:00/usr/local/sbin/zabbix_server
Zabbix 19721 19719 0 05:43? 00:00:00/usr/local/sbin/zabbix_server
Zabbix 19722 19719 0 05:43? 00:00:00/usr/local/sbin/zabbix_server
Zabbix 19723 19719 0 05:43? 00:00:00/usr/local/sbin/zabbix_server
Zabbix 19724 19719 0 05:43? 00:00:00/usr/local/sbin/zabbix_server
Zabbix 19725 19719 0 05:43? 00:00:00/usr/local/sbin/zabbix_server
Zabbix 19727 19719 0 05:43? 00:00:00/usr/local/sbin/zabbix_server
Zabbix 19728 19719 0 05:43? 00:00:00/usr/local/sbin/zabbix_server
Zabbix 19729 19719 0 05:43? 00:00:00/usr/local/sbin/zabbix_server
Zabbix 19730 19719 0 05:43? 00:00:00/usr/local/sbin/zabbix_server
Zabbix 19732 19719 0 05:43? 00:00:00/usr/local/sbin/zabbix_server
Zabbix 19734 19719 0 05:43? 00:00:00/usr/local/sbin/zabbix_server
Zabbix 19735 19719 0 05:43? 00:00:00/usr/local/sbin/zabbix_server
[Email protected] ~]# NETSTAT-LANTP |grep 10051
TCP 0 0 0.0.0.0:10051 0.0.0.0:* LISTEN 19719/zabbix_server
7. Configure the agent side
[Email protected] zabbix-2.0.14]#./configure--prefix=/usr/local/zabbix--enable-agent
[[email protected] zabbix-2.0.14] #make Install
To add a soft link:
[Email protected] zabbix-2.0.14]# ln-s/usr/local/zabbix/sbin/zabbix_*/usr/local/sbin/
Modify Zabbix_agentd.conf:
[email protected] ~]# vi/usr/local/zabbix/etc/zabbix_agentd.conf Add the following:
Logfile=/tmp/zabbix_agentd.log
server=172.16.4.63
serveractive=172.16.4.63
Hostname=zabbix Server
Unsafeuserparametess=1
Copy the script and start:
[[Email protected] ~] #cd/root/zabbix-2.0.14
[email protected] zabbix-2.0.14]# CP misc/init.d/tru64/zabbix_agentd/etc/init.d/
[[email protected] zabbix-2.0.14] #chmod +x/etc/init.d/zabbix_agentd
[[email protected] zabbix-2.0.14] #vi/etc/init.d/zabbix_agentd Add the following:
#!/bin/sh
#chkconfig: 35 95 95
#description: Zabbix Agent Server
Add Service:
[[email protected] zabbix-2.0.14] #chkconfig add Zabbix_agentd
Boot auto Start:
[[email protected] zabbix-2.0.14] #chkconfig zabbix_agentd on
Start the service:
[[email protected] zabbix-2.0.14]#/etc/init.d/zabbix_agentd start
8. Start the installation
Open Browser input http://172.16.4.62 display as follows
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/58/D2/wKioL1S956SjcJHzAASPt2Fz17g803.jpg "/>
Red Word Error: Follow the prompts to modify/etc/php.ini as follows:
[Email protected] ~]# sed-i '/post_max_size/s/8/16/g;/max_execution_time/s/30/300/g;/max_input_time/s/60/300/g; ' /etc/php.ini
<strong
Detailed Zabbix monitoring system installation and deployment