Home >Operation and Maintenance >Apache >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!