有网络营销人员在Linux服务器上,安装了CWP7 控制面板Apache 2.4.25,但Apache服务没有启动,出现了下面的错误 ▼
httpd.service - Web server Apache Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled) Active: failed (Result: exit-code) since Wed 2022-04-13 05:21:29 EST; 4min 53s ago Process: 12087 ExecStart=/usr/local/apache/bin/apachectl start (code=exited, status=1/FAILURE) Apr 13 05:21:29 www.etufo.org systemd[1]: Starting Web server Apache... Apr 13 05:21:29 www.etufo.org apachectl[12087]: AH00526: Syntax error on line 12 of /usr/local/apache/conf/sharedip.conf: Apr 13 05:21:29 www.etufo.org apachectl[12087]: Invalid command 'Require', perhaps misspelled or defined by a module not included in the server configuration Apr 13 05:21:29 www.etufo.org systemd[1]: httpd.service: control process exited, code=exited status=1 Apr 13 05:21:29 www.etufo.org systemd[1]: Failed to start Web server Apache. Apr 13 05:21:29 www.etufo.org systemd[1]: Unit httpd.service entered failed state. Apr 13 05:21:29 www.etufo.org systemd[1]: httpd.service failed.
Apache2报错怎么卸载重装?
于是,在CentOS 7 卸载删除Apache服务。
输入以下CWP卸载删除Apache服务命令 ▼
yum remove cwp-httpd
Apache服务yum命令删除重装
第 1 步:yum命令安装Apache服务
CWP卸载删除Apache服务后,yum命令重新安装Apache服务 ▼
yum install cwp-httpd
第 2 步:激活 Apache,需要启动Apache 服务。
在SSH中输入以下命令 ▼
systemctl start httpd
第 3 步:接下来,设置Apache服务在系统启动时启动:
systemctl enable httpd
第 4 步:查看 Apache 服务状态
显示有关 Apache 的信息,查看当前运行Apache 服务状态:
systemctl status httpd
希望陈沩亮博客( https://www.chenweiliang.com/ ) 分享的《Apache2报错怎么卸载重装?Apache服务yum命令删除重装》,对您有帮助。
欢迎分享本文链接:https://www.chenweiliang.com/cwl-27525.html
欢迎加入Telegram频道,获取最新更新!
喜欢就分享和按赞!您的分享和按赞,是我们持续的动力!