[root@server134 zabbix-2.4.8]# ./configure --sysconfdir=/etc/zabbix --enable-server --enable-agent --with-net-snmp --with-libcurl --with-mysql --with-ssh2 --enable-Java
configure: error: MySQL library not found
[root@server134 zabbix-2.4.8]# yum install mysql-devel
[root@server134 zabbix-2.4.8]# make &&make install
3.6、Copy zabbixserver端跟agent端的启动脚本,并设置执行权限
[root@server134 zabbix-2.4.8]# cp misc/init.d/tru64/zabbix_agentd /etc/init.d/
[root@server134 zabbix-2.4.8]# cp misc/init.d/tru64/zabbix_server /etc/init.d/
[root@server134 zabbix-2.4.8]# chmod +x /etc/init.d/zabbix_*
[root@server134 zabbix-2.4.8]# cp misc/init.d/tru64/zabbix_agentd /etc/init.d/
[root@server134 zabbix-2.4.8]# cp misc/init.d/tru64/zabbix_server /etc/init.d/
[root@server134 zabbix-2.4.8]# chmod +x /etc/init.d/zabbix_*
[root@server134 zabbix-2.4.8]# mkdir /var/www/html/zabbix
[root@server134 zabbix-2.4.8]# cp -a frontends/php/* /var/www/html/zabbix/
[root@server134 zabbix-2.4.8]# chown -R apache.apache /var/www/html/zabbix/
3.7、调整使用zabbix服务所需的php参数
[root@server134 zabbix-2.4.8]# vi /etc/php.ini
date.timezone = Asia/Shanghai
max_execution_time = 300
max_input_time = 300
post_max_size = 32M
memory_limit = 128M
mbstring.func_overload = 0
[root@server134 zabbix-2.4.8]# service httpd restart
3.8、调整zabbix服务所需的参数
[root@server134 ~]# vi /etc/zabbix/zabbix_server.conf
DBHost=192.168.159.134
DBName= zabbix
DBUser=zabbix
DBPassword=zabbix
DBSocket=/var/lib/mysql/mysql.sock
StartPollers=30 开启多线程数,一般不要超过30个
StartTrappers=20 trapper线程数
StartPingers=10 fping线程数
StartDiscoverers=120
ListenIP=0.0.0.0
MaxHousekeeperDelete=5000
CacheSize=128M 用来保存监控数据的缓存数,根据监控主机的数量适当调整
StartDBSyncers=8 数据库同步时间
HistoryCacheSize=128M
TrendCacheSize=128M 总趋势缓存大小
HistoryTextCacheSize=128M
AlertScriptsPath=/etc/zabbix/alertscripts
LogSlowQueries=1000
[root@server134 ~]# service httpd restart
[root@server134 ~]# /etc/init.d/zabbix_server start
3.8、图形化安装zabbix