zabbix
项目(Items):监控指标 触发器(Triggers):阈值 模板(Templates):监控指标及阈值的集合 事件(Events) 动作(Actions) yum -y install httpd php mysql mysql-server mysql-devel php-gd gcc php-mysql php-xml libcurl-devel curl-* net-snmp* libxml2-*
关闭防火墙:
service iptables stop service ip6tables stop
禁用开机启动:
chkconfig iptables off chkconfig ip6tables off
关闭setenforce:
setenforcr 0
禁用开启启动:
下载zabbix-2.4.8 https://sourceforge.net/projects/zabbix/files/latest/download?source=typ_redirect 把下载的包传到/root下 tar zxvf zabbix-2.4.8.tar.gz -C /opt/ cd /opt/zabbix-2.4.8/
编译:
server: ./configure --prefix=/usr/local/zabbix --enable-server --enable-agent --with-mysql --with-net-snmp --with-libcurl --with-libxml2 proxy(代理): ./configure --prefix=/usr/local/zabbix --enable-proxy --enable-agent --with-mysql --with-net-snmp --with-libcurl --with-libxml2 agent: ./configure --prefix=/usr/local/zabbix --enable-agent make make install
service mysqld start
初始化数据库:
mysql_secure_installation
设置数据库编码:
vim /etc/my.cnf
重启数据库:
service mysqld restart
创建zabbix数据库并授权:
vim /etc/my.cnf 然后重启数据库: service mysqld restart
导入zabbix数据库结构:
进入web目录: 创建test文件测试:
修改PHP参数:
vim /etc/php.ini 保存退出: 此时返回页面,点击retry: 发现所有参数都已正常:
修改界面为中文:
此时发现界面已为中文:
配置zabbix-server:
保存退出: 创建zabbix用户:
启动zabbix-server:
配置zabbix-agent:
启动zabbix-agent:
查看zabbix-server进程: 查看zabbix-agent进程:
页面乱码:
此时数据已能正常监控,但页面存在乱码: 解决办法: 此时已没有乱码:
最后添加自启动,避免关机造成zabbix异常: chkconfig httpd on chkconfig mysqld on