http://httpd.apache.org/docs/1.3/cygwin.html#serv
Use the following statement to install
httpd.exe
as a new service:
$ cygrunsrv -I service_name-p /usr/local/apache/bin/httpd.exe
[-a arguments] [-e VAR=VALUE] [-t auto|manual]
[-u user] [-w passwd]
Where -a
is used to pass command line
arguments (such as -DFOO
defines) to
httpd.exe
, and -e
is used to pass
environment variables. If necessary you may use the
-t
options to set the autostart configuration
for the service. If you want the new service to run under a
different userid, you will have to supply the
-u
and -w
options.
Starting Apache as a Service
After the new service is installed it can be started
using the following command:
$ cygrunsrv -S service_name
Check your process table and global
error_log
file to ensure Apache has started
without any major problems.
Stopping an Apache Service
A running Apache service may be stopped using the
following command:
$ cygrunsrv -E service_name
This will stop all running httpd.exe
processes and shutdown the HTTP service for the
machine.
Removing an Apache Service
An installed Apache service may be removed from Windows
NT or Windows 2000 using the following command:
$ cygrunsrv -R service_name
This will remove your previously defined and installed
service from the machine.
No comments:
Post a Comment