Home >Operation and Maintenance >Apache >What command is used to install the Apache service?

What command is used to install the Apache service?

藏色散人
藏色散人Original
2019-08-02 13:25:065619browse

What command is used to install the Apache service?

What command is used to install the Apache service?

Simple command for apache under windows

1) Command to install apache service

httpd.exe -k install

2) Specify the name of the service to be installed (applicable to several different Apache service facilities on the computer )

httpd.exe -k install -n “MyServiceName”

3) Specify the path and name of the service configuration file

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

Note: If you do not use special parameters (such as httpd.exe -k install), the service name is Apache2.X, configure The file is conf\httpd.conf

4) Remove an Apache service

httpd.exe -k uninstall

5) Remove a specific Apache service

httpd.exe -k uninstall -n “MyServiceName”

Manage Apache service

1) Start the installed Apache service

httpd.exe -k start

2) Stop the installed Apache service

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

3) Restart the installed Apache service (force the service to reread the configuration file, applicable after modifying the configuration file)

httpd.exe -k restart

For more Apache related knowledge, please visit the Apache Usage Tutorial column!

The above is the detailed content of What command is used to install the Apache service?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:what exactly is apacheNext article:what exactly is apache