本文主要是介绍centos7 | OCSNG server 安装错误:安装OCS后apache无法重启,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
请仔细查看ocsng的安装日志!!请按照提示创建目录即可解决下面的问题!!!
下面的方法能使apache重启,如果之后仍然有报错error:500,可以参考这篇博文:OCS inventory | agent 运行问题 | 系统日志 。以下是原文:
安装ocs server后,systemctl start httpd
失败
错误如下:
[root@slave3 plugins]# systemctl status httpd.service
● httpd.service - The Apache HTTP ServerLoaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)Active: failed (Result: exit-code) since 五 2019-10-04 16:34:13 CST; 13s agoDocs: man:httpd(8)man:apachectl(8)Process: 8457 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)Process: 8451 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)Main PID: 8451 (code=exited, status=1/FAILURE)10月 04 16:34:12 slave3 systemd[1]: Starting The Apache HTTP Server...
10月 04 16:34:13 slave3 httpd[8451]: [Fri Oct 04 16:34:13.009405 2019] [perl:error] [pid 8451] Can't locate Apache/Ocsinventory/Plugins/Apache.pm in @INC (@INC contains: /usr/local/lib6...
10月 04 16:34:13 slave3 httpd[8451]: [Fri Oct 04 16:34:13.009565 2019] [perl:error] [pid 8451] Can't load Perl module Apache::Ocsinventory::Plugins::Apache for server (null):0, exiting...
10月 04 16:34:13 slave3 systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
10月 04 16:34:13 slave3 kill[8457]: kill: cannot find process ""
10月 04 16:34:13 slave3 systemd[1]: httpd.service: control process exited, code=exited status=1
10月 04 16:34:13 slave3 systemd[1]: Failed to start The Apache HTTP Server.
10月 04 16:34:13 slave3 systemd[1]: Unit httpd.service entered failed state.
10月 04 16:34:13 slave3 systemd[1]: httpd.service failed.
Hint: Some lines were ellipsized, use -l to show in full.
将之前下载的ocs文件中的如下文件与目录复制到/usr/local/share/perl5/Apache/
即可
/opt/OCSNG_UNIX_SERVER_2.4.1/Apache/Ocsinventory/opt/OCSNG_UNIX_SERVER_2.4.1/Apache/Ocsinventory.pm
没有/usr/local/share/perl5/Apache/
目录mkdir -p
创建即可。
mv -f /opt/OCSNG_UNIX_SERVER_2.4.1/Apache/Ocsinventory /usr/local/share/perl5/Apache/mv -f /opt/OCSNG_UNIX_SERVER_2.4.1/Apache/Ocsinventory.pm /usr/local/share/perl5/Apache/
这篇关于centos7 | OCSNG server 安装错误:安装OCS后apache无法重启的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!