httpd Windows 上安装

安装成NT Service

以管理员身份运行cmd,切换到Apache的bin目录下,执行:

httpd.exe -k install -n "Apache2.4"

完整过程如下:

C:\Apache24\bin>httpd.exe -k install -n "Apache2.4"
Installing the Apache2.4 service
The Apache2.4 service is successfully installed.
Testing httpd.conf....
Errors reported here must be corrected before the service can be started.
 
C:\Apache24\bin>