原因是 SELinux 的干扰,解决办法是关掉
代码语言:javascript复制[root@zabbix-server conf.d]# getenforce
Enforcing
[root@zabbix-server conf.d]# setenforce 0
[root@zabbix-server conf.d]# getenforce
Permissive
[root@zabbix-server conf.d]#
报警就消失了
但这是暂时的,服务器重启后会失效,为避免重启后这个问题复现,可以将 SELINUX 关闭
方法如下
代码语言:javascript复制[root@zabbix-server conf.d]# grep "^SELI" /etc/sysconfig/selinux
SELINUX=enforcing
SELINUXTYPE=targeted
[root@zabbix-server conf.d]# vim /etc/sysconfig/selinux
[root@zabbix-server conf.d]# grep "^SELI" /etc/sysconfig/selinux
SELINUX=disabled
SELINUXTYPE=targeted
[root@zabbix-server conf.d]#
命令汇总
wget http://repo.zabbix.com/zabbix/2.4/rhel/6/x86_64/zabbix-release-2.4-1.el6.noarch.rpm
rpm -ivh zabbix-release-2.4-1.el6.noarch.rpm
ll /etc/yum.repos.d/zabbix.repo
yum install zabbix-server-mysql zabbix-web-mysql
mysql -u root -p
cd /usr/share/doc/zabbix-server-mysql-2.4.7/create/
mysql -u root -p zabbix < schema.sql
mysql -u root -p zabbix < images.sql
mysql -u root -p zabbix < data.sql
vim /etc/zabbix/zabbix_server.conf
grep -v "^#" /etc/zabbix/zabbix_server.conf | cat -s
diff /tmp/old /tmp/new
vim /etc/httpd/conf.d/zabbix.conf
grep php_value /etc/httpd/conf.d/zabbix.conf
vim /etc/sysconfig/iptables
grep 80 /etc/sysconfig/iptables
/etc/init.d/iptables reload
iptables -L -nv | grep 80
/etc/init.d/httpd start
/etc/init.d/zabbix-server start
setenforce 0
getenforce
vim /etc/sysconfig/selinux
grep "^SELI" /etc/sysconfig/selinux
原文地址