How do I reinstall the HTTPD?

I have a problem with my server CentOs7. I installed httpd, it works fine, but I reinstalled for some reason, but after that it never works and throws error. Is there any way I can remove all httpd files?

I tried removing /usr/lib/systemd/system/httpd.serviceand /usr/sbin/httpdand /etc/httpd, but then when I removed httpd and httpd-tools it throws error again:

Job for httpd.service failed. See "systemctl status httpd.service" and "journalctl -xe" for details.

systemctl status httpd.service:

● httpd.service - The Apache HTTP Server Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled) Active: failed (Result: protocol) since Tue 2021-02-23 04:13:01 EST; 21s ago Docs: man:httpd(8) man:apachectl(8) Process: 5396 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=0/SUCCESS) Main PID: 5396 (code=exited, status=0/SUCCESS)
Feb 23 04:13:01 localhost.localdomain systemd[1]: Starting The Apache HTTP Server...
Feb 23 04:13:01 localhost.localdomain httpd[5396]: AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain. Set the 'ServerName' directive globally to suppress this message
Feb 23 04:13:01 localhost.localdomain httpd[5396]: httpd (pid 3043) already running
Feb 23 04:13:01 localhost.localdomain systemd[1]: Failed to start The Apache HTTP Server.
Feb 23 04:13:01 localhost.localdomain systemd[1]: Unit httpd.service entered failed state.
Feb 23 04:13:01 localhost.localdomain systemd[1]: httpd.service failed.

1 Answer

Why are you manually removing the service files instead of simply launching yum remove httpd?

Have you tried at all to remove the service via yum and then reinstall it again with yum install httpd? What's the output?

The error reports that the service is already running: httpd (pid 3043) already running

What's the result of ps -aux | less?

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like