启动zabbix-server出现cannot open "/var/log/zabbixsrv/zabbix_server.log": [13] Permission denied
[root@Server web]# /etc/init.d/zabbix-server restart
Shutting down Zabbix server: [FAILED]
Starting Zabbix server: [ OK ]
[root@Server web]# zabbix_server [2285]: cannot open "/var/log/zabbixsrv/zabbix_server.log": [13] Permission denied
解决:
12345 [root@Server zabbixsrv]# touch /var/log/zabbixsrv/zabbix_server.log
[root@Server zabbixsrv]# chown zabbix zabbix_server.log
[root@Server zabbixsrv]# /etc/init.d/zabbix-server restart
Shutting down Zabbix server: [FAILED]
Starting Zabbix server: [ OK ]
出现pid问题
[root@Server zabbixsrv]# tail -f zabbix_server.log
zabbix_server [2368]: cannot create PID file [/var/run/zabbixsrv/zabbix_server.pid]: [2] No such file or directory
创建相应目录以及相应的权限即可,最后重启服务
[root@Server zabbixsrv]# mkdir /var/run/zabbixsrv/
[root@Server zabbixsrv]# chown zabbix /var/run/zabbixsrv/ -R
[root@Server zabbixsrv]# /etc/init.d/zabbix-server restart
Shutting down Zabbix server: [FAILED]
Starting Zabbix server: [ OK ]
7、替换date.timezone改成Shanghai即可,操作如下
[root@Server ~]# cd /etc/httpd/conf.d/
[root@Server conf.d]# ls
php.conf README welcome.conf zabbix.conf
[root@Server conf.d]# cp zabbix.conf zabbix.conf.bak
[root@Server conf.d]# sed -i "s@# php_value date.timezone Europe/Riga@php_value date.timezone Asia/Shanghai@g" /etc/httpd/conf.d/zabbix.conf
重启httpd服务即可
[root@Server conf.d]# /etc/init.d/httpd restart
Stopping httpd: [FAILED]
Starting httpd: [ OK ]
8、安装agent3.0版本
[root@Server RPMS]# pwd
/root/zabbix3.0-rpm/RPMS
[root@Server RPMS]# ls
zabbix-agent-3.0.0-1.el6.x86_64.rpm zabbix-proxy-sqlite3-3.0.0-1.el6.x86_64.rpm zabbix-web-japanese-3.0.0-1.el6.noarch.rpm
zabbix-get-3.0.0-1.el6.x86_64.rpm zabbix-sender-3.0.0-1.el6.x86_64.rpm zabbix-web-mysql-3.0.0-1.el6.noarch.rpm
zabbix-java-gateway-3.0.0-1.el6.x86_64.rpm zabbix-server-mysql-3.0.0-1.el6.x86_64.rpm zabbix-web-pgsql-3.0.0-1.el6.noarch.rpm
zabbix-proxy-mysql-3.0.0-1.el6.x86_64.rpm zabbix-server-pgsql-3.0.0-1.el6.x86_64.rpm
zabbix-proxy-pgsql-3.0.0-1.el6.x86_64.rpm zabbix-web-3.0.0-1.el6.noarch.rpm
安装zabbix-agent3.0版本即可。也可以yum install *.rpm安装所有的,根据自己的情况去安装即可
[root@Server RPMS]# yum install zabbix-agent-3.0.0-1.el6.x86_64.rpm
查看zabbix-agent安装后的版本
[root@Server zabbix]# zabbix_agentd -V
zabbix_agentd (daemon) (Zabbix) 3.0.0
Revision 58460 15 February 2016, compilation time: Feb 17 2016 09:55:34
修改zabbix_agentd.conf文件连接zabbix-server服务器ip地址即可,重启服务
[root@Server zabbix]# /etc/init.d/zabbix-agent restart
Shutting down Zabbix agent: [FAILED]
Starting Zabbix agent: [ OK ]
9、登录浏览器查看
一些Zabbix相关教程集合: