在cenots7安装zabbix,选择好需要的版本,根据手册执行:
查看状态:
[root@localhost ~]# systemctl status zabbix-agent ● zabbix-agent.service - Zabbix Agent Loaded: loaded (/usr/lib/systemd/system/zabbix-agent.service; disabled; vendor preset: disabled) Active: activating (auto-restart) (Result: resources) since 六 2021-05-08 10:20:40 CST; 6s ago Process: 35969 ExecStart=/usr/sbin/zabbix_agentd -c $CONFFILE (code=exited, status=0/SUCCESS) 5月 08 10:20:40 localhost.localdomain systemd[1]: zabbix-agent.service never wrote its PID file. Failing. 5月 08 10:20:40 localhost.localdomain systemd[1]: Failed to start Zabbix Agent. 5月 08 10:20:40 localhost.localdomain systemd[1]: Unit zabbix-agent.service entered failed state. 5月 08 10:20:40 localhost.localdomain systemd[1]: zabbix-agent.service failed. Hint: Some lines were ellipsized, use -l to show in full.
解决办法,执行以下命令:
[root@localhost ~]# getenforce Enforcing [root@localhost ~]# setenforce 0 [root@localhost ~]# getenforce Permissive
执行完毕后,再次查看状态:
[root@localhost ~]# systemctl status zabbix-agent ● zabbix-agent.service - Zabbix Agent Loaded: loaded (/usr/lib/systemd/system/zabbix-agent.service; disabled; vendor preset: disabled) Active: active (running) since 六 2021-05-08 10:23:14 CST; 7s ago Process: 38354 ExecStart=/usr/sbin/zabbix_agentd -c $CONFFILE (code=exited, status=0/SUCCESS) Main PID: 38356 (zabbix_agentd) CGroup: /system.slice/zabbix-agent.service ├─38356 /usr/sbin/zabbix_agentd -c /etc/zabbix/zabbix_agentd.conf