共计 1683 个字符,预计需要花费 5 分钟才能阅读完成。
安装完zabbix-agent以后启动失败,提示内容如下:
[root@proxyserver ~]# systemctl status zabbix-agent.service
● zabbix-agent.service - Zabbix Agent
Loaded: loaded (/usr/lib/systemd/system/zabbix-agent.service; disabled; vendor preset: disabled)
Active: activating (auto-restart) (thawing) (Result: protocol) since Thu 2022-09-01 11:40:27 CST; 162ms ago
Process: 48867 ExecStart=/usr/sbin/zabbix_agentd -c $CONFFILE (code=exited, status=0/SUCCESS)
检查Selinux配置
确认getenforce的输出结果是否为disabled,
[root@proxyserver zabbix]# getenforce
Enforcing
如果不是disable,则临时关闭selinux
[root@proxyserver zabbix]# setenforce 0
此时尝试启动zabbix-agent
[root@proxyserver zabbix]# systemctl start zabbix-agent
若能正常启动,则将selinux永久关闭,即将 SELINUX=enforcing 。
[root@proxyserver zabbix]# cat /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=enforcing
# SELINUXTYPE= can take one of these three values:
# targeted - Targeted processes are protected,
# minimum - Modification of targeted policy. Only selected processes are protected.
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
[root@proxyserver zabbix]# vi /etc/selinux/config
[root@proxyserver zabbix]# cat /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of these three values:
# targeted - Targeted processes are protected,
# minimum - Modification of targeted policy. Only selected processes are protected.
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
[root@proxyserver zabbix]#
正文完
发表至: 后端技术
2022-09-01