Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Apache 2.4 - remove | delete | uninstall

I have been searching the web for quite some time, but I could not found how to completely remove the apache 2.4 .

Using :
Windows 7
c:\apache24\

I've tried all commands, but nothing works.

httpd -k shutdown
httpd -k stop
httpd -k uninstall

keep getting the same result (for each command) :

<OS 5> access is denied.
failed to open the 'Apache2.4' service.

notice, that the service still running,
meaning that the apache is still working,
and I get the "It works!" in the localhost.

like image 678
Sahar Millis Avatar asked Jan 31 '16 09:01

Sahar Millis


2 Answers

You are probably running these commands from terminal without Administrator privileges.

If httpd -k uninstall is not working for whatever reason, you should be able to remove service by sc command: Sc delete, other tutorial here.

Again, ensure that you run these commands as Administrator.

like image 160
rkosegi Avatar answered Sep 20 '22 14:09

rkosegi


I've had this sort of problem.

The solution:

cmd/powershell 

run as ADMINISTRATOR!!! :D end! I always forget.....

Notice: In powershell need to put .\ for example:

.\httpd -k shutdown
.\httpd -k stop
.\httpd -k uninstall

Result:

Removing the 'apache2.4' service
The 'Apache2.4' service has been removed successfully.
like image 20
s.isti91 Avatar answered Sep 19 '22 14:09

s.isti91