安装lnmp
139 2014-06-27 13:53:54 wget -c
141 2014-06-27 13:54:39 tar -zxvf lnmp1.0-full.tar.gz
143 2014-06-27 13:54:45 cd lnmp1.0-full
145 2014-06-27 13:54:50 ./centos.sh
安装组件
156 2014-06-27 14:18:40 yum -y install net-snmp net-snmp-devel curl curl-devel perl-DBI iksemel* mysql-devel
安装zabbix
160 2014-06-27 14:19:42 wget
%20Latest%20Stable/2.2.4/zabbix-2.2.4.tar.gz
162 2014-06-27 14:20:00 tar -zxvf zabbix-2.2.4.tar.gz
164 2014-06-27 14:21:01 cd zabbix-2.2.4
创建数据库表
179 2014-06-27 14:27:36 mysql -uroot -pavcon -e "create database zabbix character set utf8"
182 2014-06-27 14:28:23 mysql -uroot -pavcon zabbix < /root/zabbix-2.2.4/database/mysql/schema.sql
183 2014-06-27 14:28:49 mysql -uroot -pavcon zabbix < /root/zabbix-2.2.4/database/mysql/images.sql
184 2014-06-27 14:28:55 mysql -uroot -pavcon zabbix < /root/zabbix-2.2.4/database/mysql/data.sql
编译安装
185 2014-06-27 14:30:37 cd "/root/zabbix-2.2.4"
204 2014-06-27 14:46:13 ./configure --prefix=/usr/local/zabbix --enable-server --with-mysql --with-net-snmp --with-jabber --with-libcurl
--enable-agent
206 2014-06-27 14:47:14 make install
修改配置文件
vim /etc/services
#添加下面的字段
zabbix-agent 10050/tcp #Zabbix Agent
zabbix-agent 10050/udp #Zabbix Agent
zabbix-trapper 10051/tcp #Zabbix Trapper
zabbix-trapper 10051/udp #Zabbix Trapper
#修改 zabbix server 配置文件
vim /usr/local/zabbix/etc/zabbix_server.conf
DBUser=zabbix
DBPassword=zabbix
启动设置
239 2014-06-27 14:57:51 cp misc/init.d/fedora/core/zabbix_* /etc/init.d/
240 2014-06-27 14:58:58 sed -i 's/BASEDIR=\/usr\/local/BASEDIR=\/usr\/local\/zabbix/g' /etc/init.d/zabbix_server
241 2014-06-27 14:58:59 sed -i 's/BASEDIR=\/usr\/local/BASEDIR=\/usr\/local\/zabbix/g' /etc/init.d/zabbix_agentd
242 2014-06-27 14:59:05 chmod +x /etc/init.d/zabbix_server
243 2014-06-27 14:59:05 chmod +x /etc/init.d/zabbix_agentd
#添加mysql client库到系统默认库中:
244 2014-06-27 14:59:19 vi /etc/ld.so.conf
#添加:
/usr/local/mysql/lib
添加zabbix用户
248 2014-06-27 15:02:01 useradd zabbix
249 2014-06-27 15:02:04 /etc/init.d/zabbix_server start
##########################################################
web界面安装
mkdir /home/wwwroot/default/zabbix
cp -ar zabbix-2.2.4/frontends/php/* /home/wwwroot/default/zabbix/
修改php.ini