r2 - 23 May 2007 - 03:48:17 - SooGuanYou are here: TWiki >  Main Web  >  ElixirReport > ElixirReportServerCookbook > Service

Run Server as System Service

Elixir Repertoire Server allow you to run as system service in the various platform as Windows and Unix. Setting up Repertoire Server to run as service will vary between platforms and will require some system administration knowledge and root privileges. Below briefly described the steps.

Running Server as service in Windows

On a Windows system, we provide a utility, Java Service Wrapper, to deploy the server as a Window service.

From the server root the directory, bin/windows-service, contains all the necessary files to run RepertoireServer? as an windows service. The only step is to execute windows-install-ERS-Service.bat after you have finalized the configuration. You may test to see if the installation was successful by running the console based application script, windows-ERS-app.bat.

The configuration of the server as Java VM option and class path is kept in the bin/windows-service/ wrapper.conf file. You areable to modify the Windows service information as Display name and descriptionof the service. The details are described with the configuration file, the other use is that it allow you to create multiple instance of the server to run as serivce. The name has to be unique.

The bin/windows-service directory also contains a dll called wrapper.dll which link Java application and Windows service. The Java VM location is set in using wrapper.java.command property. You may hard code the path or use system path as wrapper.java.command=%JAVA_HOME%/bin/java where %JAVA_HOME% is the window system property

The logs of the Java Wrapper activities is stored in the Wrapper log in the server directory. You can limit the size of the wrapper.log file and enable the log rolling. For example, the following properties will configure the Wrapper to roll the log file when it reaches 1MB in size and then keep the 5 most recent files. This will use a maximum of 5MB of disk space. You can set the numbers even smaller of course if you want.(Use k for kilobytes).
wrapper.logfile.maxsize=512k
wrapper.logfile.maxfiles=5
If you really want to completely disable logging to the file, you can do so by simply setting the log level to the file to NONE like this:
wrapper.logfile.loglevel=NONE

To install, execute the windows-service/windows-install-service.bat, go to Control Panel, Administrative Tools, Services, you should see Elixir Report Server installed as a service there. You can start and stop the service from this console or set the service state on startup. To remove it from the list of services, execute windows-service/windows-uninstall-service.bat, which will stop the service if it is running and remove it from the list of installed services.

Please refer to http://wrapper.tanukisoftware.org for documentation and details on the Java Service Wrapper.

Running Server as service in Linux (Centos 5)

The server can be configured to part of the bootup in Linux Operating system. Here briefly described the steps used in deploying the script to Centos 5 a variant of Linux OS.

  1. Create a init script for Repertoire Server in /etc/init.d directory.
  2. Deploy into the different run level using chkconfig as described in the init script. More details for chkconfig is found at http://wiki.caoslinux.org/Startup_scripts_with_service_and_chkconfig.
  3. Replace the default Java shipped in Linux with Sun's java or other vendor's JVM (version 1.5.0 or later) and setup the appropriate path.
  4. Set the Java to run in background in the startup script of Repertoire Server as startServer.sh and stopServer.sh scripts. This is important as it may cause the OS to appear as hung if Java is running as foreground.
  5. Deploy Repertoire server license in ext directory of Repertoire Server.

Below is a sample script. This script has been tested on Centos 5 and Sun Java Linux, 1.6.0_01.

-- SooGuan - 22 May 2007

toggleopenShow attachmentstogglecloseHide attachments
Topic attachments
I Attachment Action Size Date Who Comment
zipzip centos5-initscript.zip manage 1.2 K 23 May 2007 - 03:25 SooGuan Linux Startup Script For Repertoire Server
Edit | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r2 < r1 | More topic actions
 
Powered by TWiki
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback