Windows service

From Resin 3.0

(Difference between revisions)
Jump to: navigation, search
 
(migration)
 
Line 1: Line 1:
#redirect [[Resin web server#Deploying as a Windows service]]
+
The Resin Web Server can be installed as a Windows service.
 +
To install the service, use:
 +
 
 +
<!-- pre syntax="sh" -->
 +
  (prompt) httpd.exe -install -conf conf/resin.conf
 +
<!-- /pre -->
 +
 
 +
To remove the service, use [[-remove]]:
 +
 
 +
<!-- pre syntax="console" -->
 +
  (prompt) httpd.exe -remove
 +
<!-- /pre -->
 +
 
 +
You will either need to reboot the machine or start the service
 +
from the '''Control&nbsp;Panel''' | '''Services''' panel to start the server.
 +
On a machine reboot Windows will automatically start the web server.
 +
 
 +
You can also start and stop the service from the command-line:
 +
 
 +
<!-- pre syntax="console" -->
 +
  (prompt) net start resin
 +
  ...
 +
  (prompt) net stop resin
 +
<!-- /pre -->
 +
 
 +
The [[-server]] option is used if you have multiple JVMs either on different
 +
machines or the same machine.
 +
The [[load balancing]] and [[distributed session]]s topics describe usage
 +
of [[-server]].
 +
 
 +
Resin's [[-install]] option saves the command-line options and starts the
 +
service with those options.  You can look at them in the control panel, under
 +
the executable string.
 +
 
 +
With multiple servers, you can use ""[[-install-as]] ''name''" to specify
 +
a unique service name.
 +
 
 +
<!-- pre syntax="console" -->
 +
  (prompt) httpd.exe -install-as ResinA -conf conf/myconf.conf -server a
 +
  (prompt) net start ResinA
 +
<!-- /pre -->
 +
 
 +
There is a bug in many JDKs which cause the JDK to exit when the
 +
administrator logs out.  You can avoid that bug if the
 +
JDK is started with [[-Xrs]]
 +
 
 +
<!-- pre syntax="console" -->
 +
  (prompt) httpd.exe -install -Xrs
 +
<!-- /pre -->

Latest revision as of 09:56, 14 February 2006

The Resin Web Server can be installed as a Windows service. To install the service, use:

 (prompt) httpd.exe -install -conf conf/resin.conf

To remove the service, use -remove:

 (prompt) httpd.exe -remove

You will either need to reboot the machine or start the service from the Control Panel | Services panel to start the server. On a machine reboot Windows will automatically start the web server.

You can also start and stop the service from the command-line:

 (prompt) net start resin
 ...
 (prompt) net stop resin

The -server option is used if you have multiple JVMs either on different machines or the same machine. The load balancing and distributed sessions topics describe usage of -server.

Resin's -install option saves the command-line options and starts the service with those options. You can look at them in the control panel, under the executable string.

With multiple servers, you can use ""-install-as name" to specify a unique service name.

 (prompt) httpd.exe -install-as ResinA -conf conf/myconf.conf -server a
 (prompt) net start ResinA

There is a bug in many JDKs which cause the JDK to exit when the administrator logs out. You can avoid that bug if the JDK is started with -Xrs

 (prompt) httpd.exe -install -Xrs
Personal tools