How to uninstall and reinstall when Apache2 reports an error? Apache service yum command to delete and reinstall

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?

How to uninstall and reinstall when Apache2 reports an error? Apache service yum command to delete and reinstall

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!

🔔 Be the first to get the valuable "ChatGPT Content Marketing AI Tool Usage Guide" in the channel top directory! 🌟
📚 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!

 

Comment

Your email address will not be published. Required fields * Callout

scroll to top