启动
systemctl start zabbix-agent
报错
Job for zabbix-agent.service failed because the control process exited with error code. See "systemctl status zabbix-agent.service" and "journalctl -xe" for details.
执行
journalctl -xe
显示
Jul 03 10:30:02 10-255-20-247 runuser[26085]: pam_unix(runuser:session): session opened for user zabbix by (uid=0)
Jul 03 10:30:02 10-255-20-247 **zabbix-agent[26076]: Starting Zabbix agent: /usr/sbin/zabbix_agentd: error while loading shared libraries: libpcre.so.0: cannot open shared object file: No such file or directory**
Jul 03 10:30:02 10-255-20-247 runuser[26085]: pam_unix(runuser:session): session closed for user zabbix
Jul 03 10:30:02 10-255-20-247 systemd[1]: zabbix-agent.service: control process exited, code=exited status=1
Jul 03 10:30:02 10-255-20-247 zabbix-agent[26076]: [FAILED]
Jul 03 10:30:02 10-255-20-247 systemd[1]: Failed to start LSB: Start and stop Zabbix agent.
zabbix-agent[26076]: Starting Zabbix agent: /usr/sbin/zabbix_agentd: error while loading shared libraries: libpcre.so.0: cannot open shared object file: No such file or directory
cd lib64/
ls -ld libpcre.so.*
lrwxrwxrwx. 1 root root 16 Jan 29 2019 libpcre.so.1 -> libpcre.so.1.2.0
-rwxr-xr-x. 1 root root 402384 Aug 2 2017 libpcre.so.1.2.0
ln -s /lib64/libpcre.so.1.2.0 /lib64/libpcre.so.0
ls -ld libpcre.so.*
lrwxrwxrwx 1 root root 23 Jul 3 10:33 libpcre.so.0 -> /lib64/libpcre.so.1.2.0
lrwxrwxrwx. 1 root root 16 Jan 29 2019 libpcre.so.1 -> libpcre.so.1.2.0
-rwxr-xr-x. 1 root root 402384 Aug 2 2017 libpcre.so.1.2.0
问题解决
systemctl start zabbix-agent
ps -ef |grep zabbix
zabbix 27472 1 0 10:34 ? 00:00:00 /usr/sbin/zabbix_agentd -c /etc/zabbix/zabbix_agentd.conf
zabbix 27473 27472 0 10:34 ? 00:00:00 /usr/sbin/zabbix_agentd: collector [idle 1 sec]
zabbix 27474 27472 0 10:34 ? 00:00:00 /usr/sbin/zabbix_agentd: