...
- Download openspecimen.service.
- Edit file downloaded in step #1 in any editor of your choice. Replace first occurrence of
$CATALINA_HOME
with the value ofand $TOMCAT_HOME
with the absolute path of Tomcat directory. (Like /usr/local/openspecimen/tomcat-as) - Copy edited file to
/etc/systemd/system
directory - Stop Tomcat process, if running
- Execute below command to notify systemd that OpenSpecimen service has been added
$sudo systemctl daemon-reload
- Use below commands to start, status .stop, or restart OpenSpecimen service
$sudo systemctl start openspecimen.service
$sudo systemctl status openspecimen.service
$sudo systemctl stop openspecimen.service
$sudo systemctl restart openspecimen.service
- Enable starting of OpenSpecimen on boot by executing below command:
$sudo systemctl enable openspecimen.service
...
- Before running point no 7 make sure openspecimen service is not in running state.
- In the openspecimen.service file. Value of User directive is the name of the Linux user from who will start the service. (By default value is set to openspecimen).
Error may occur when starting the service: Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
Resolution : Add 'export JAVA_HOME=<java-installation-path>' line in setenv.sh file located in Tomcat/bin directory. Create a file if not already present and give executable permission to setenv.sh file
Example: export JAVA_HOME=/usr/lib/jvm/jdk1.8.0_45
Expand | ||
---|---|---|
| ||
Note: Use sudo or root privileges while creating a Tomcat service.
UbuntuTo enable starting OpenSpecimen service on boot, execute below command:
If you've customized service name, use the customized name instead of Redhat 6.x/CentOS 6.xUse
Use below command line to start OpenSpecimen service at a specific run level:
Note: To setup the 'OpenSpecimen service' we need the below prerequisites : |
...