日期:2014-05-16  浏览次数:20757 次

给apache注册window 服务
    有时我们下载的是别人安装好的apache,有时有可能是你重装过win操作系统,有可能是恢复过win操作系统,这种情况下,你的操作系统默认是没有服务的,但是没有服务,apache用起来就很不方便,很多人在此时想到是重装apache,然后重新配置。其实可以不必要重装,我们在cmd里进入Apache2.2\bin目录,然后直接运行httpd -k install, 此时,apache服务就已经与window注册了,如:

D:\program\java\servers\Apache2.2\bin>httpd -k install
Installing the Apache2.2 service
The Apache2.2 service is successfully installed.
Testing httpd.conf....
Errors reported here must be corrected before the service can be started.