Apache 2.4 - remove | delete | uninstall

自作多情 提交于 2019-12-07 14:51:29

问题


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.


回答1:


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.




回答2:


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.



回答3:


I noticed if you haven't added Apache to your path environment variables(call Apache from any folder/directory). You will have to cd.. to your Apache/bin directory and run
.\httpd -k uninstall to uninstall. (Remember to run PowerShell as administrator)




回答4:


Run the Command Prompt as an administrator and type:

C:\Apache24\bin>httpd -k uninstall

Worked in Windows 10



来源:https://stackoverflow.com/questions/35112260/apache-2-4-remove-delete-uninstall

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!