Windwos版本Apache安装

官网下载:

必须要安装:httpd.exe -k install

修改配置文件:\conf\httpd.conf

测试该服务的配置文件:httpd.exe -n "MyServiceName" –t

启动已安装的apache服务:httpd.exe -k start

停止:httpd -k stop  ||  httpd -k shutdown

知识扩展

1. 安装/卸载Apache服务

1) 安装apache服务

httpd.exe -k install

2) 指定要安装的服务的名称(适用于电脑上有几个不同的Apache服务设施)

httpd.exe -k install -n "MyServiceName"

3) 指定服务配置文件的路径和名称

httpd.exe -k install -n "MyServiceName" -f "c:\files\my.conf"

注:若不使用特殊参数(如httpd.exe -k install),服务名称为Apache2.X,配置文件为conf\httpd.conf

4) 移除一个Apache服务

httpd.exe -k uninstall

5) 移除特定的Apache服务

httpd.exe -k uninstall -n "MyServiceName"

2. 管理Apache服务

1) 启动已安装的Apache服务

httpd.exe -k start

2) 停止已安装的Apache服务

httpd.exe -k stop || httpd.exe -k shutdown

3) 重启已安装的Apache服务(迫使服务重读配置文件,适用于修改配置文件后)

httpd.exe -k restart

猜你喜欢

转载自blog.csdn.net/liangyely/article/details/107846114