Article directory
will get Internet marketingStaff inLinuxOn the server, installCWP7 control panel Apache 2.4.25, but the Apache service does not start, the following error appears▼
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.
How to uninstall and reinstall when Apache2 reports an error?
So, inCentOS 7 Uninstall and delete the Apache service.
Enter the following CWP uninstall remove Apache service command ▼
yum remove cwp-httpd
Apache service yum command to delete and reinstall
Step 1:yum command to install Apache service
After uninstalling CWP and deleting the Apache service, use the yum command to reinstall the Apache service▼
yum install cwp-httpd
Step 2:To activate Apache, you need to start the Apache service.
Enter the following command in SSH▼
systemctl start httpd
Step 3:Next, set the Apache service to start at system startup:
systemctl enable httpd
Step 4:View Apache service status
Display information about Apache and view the status of the currently running Apache service:
systemctl status httpd
Hope Chen Weiliang Blog ( https://www.chenweiliang.com/ ) shared "How to uninstall and reinstall when Apache2 reports an error? Apache service yum command to delete and reinstall" is helpful to you.
Welcome to share the link of this article:https://www.chenweiliang.com/cwl-27525.html
Welcome to the Telegram channel of Chen Weiliang's blog to get the latest updates!
📚 This guide contains huge value, 🌟This is a rare opportunity, don’t miss it! ⏰⌛💨
Share and like if you like!
Your sharing and likes are our continuous motivation!