4.5. Running Enterprise Web Server
After the installation is complete, you can run the required Enterprise Web Server components.
4.5.1. Running Tomcat Copy linkLink copied to clipboard!
Copy linkLink copied to clipboard!
Tomcat can be run either in the foreground as a program or in the background as a service.
Important
We strongly recomend to run tomcat as a service (see Section 4.5.1.2, “Running Tomcat as a Service”). Note that this is the only supported running method.
4.5.1.1. Running Tomcat as a Program Copy linkLink copied to clipboard!
Copy linkLink copied to clipboard!
If you want to run Tomcat as a program, use either the
tomcat[6,7] script in the sbin directory or the catalina script in the lib directory:
- To start Tomcat with the tomcat script, run the following command as the root user with the respective Tomcat version (
6or7):The system reads the configuration file and changes to the user and group of the tomcat user account (that is, Tomcat is always run under the tomcat user). By default,/opt/jboss-ews-2.1/sbin/tomcat<VERSION> start
/opt/jboss-ews-2.1/sbin/tomcat<VERSION> startCopy to Clipboard Copied! Toggle word wrap Toggle overflow tomcat-nativeis automatically added to theLD_LIBRARY_PATHand-Djava.library.pathduring Tomcat startup. - To start Tomcat with the
catalina.shscript, run the following command with the respective Tomcat version (6or7) :The/opt/jboss-ews-2.1/share/tomcat<VERSION>/bin/catalina.sh
/opt/jboss-ews-2.1/share/tomcat<VERSION>/bin/catalina.shCopy to Clipboard Copied! Toggle word wrap Toggle overflow catalina.shscript detects the running JVM version and adds the/opt/jboss-ews-2.1/lib/path (/opt/jboss-ews-2.1/lib64for 64 bit JVM) to the library path.
4.5.1.2. Running Tomcat as a Service Copy linkLink copied to clipboard!
Copy linkLink copied to clipboard!
To run Tomcat as a service with
jsvc:
- In Tomcat 6, use the script
daemon.shlocated in/opt/jboss-ews-2.1/share/apache-tomcat-6.x/bin/. - In Tomcat 7, use the script
daemon.shlocated in/opt/jboss-ews-2.1/share/apache-tomcat-7.x/bin/.
To run Tomcat as a service, use
scm as follows:
Procedure 4.9. Use SCM to Run Tomcat as a Service
- At the shell prompt, become the
rootuser. - Create a new file named
tomcat.xmlat the location/var/svc/manifest/application/web/. - Copy and paste the following contents into the newly created
tomcat.xmlfile.Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Run the following command to import the new file:
/usr/sbin/svccfg import /var/svc/manifest/application/web/tomcat.xml
# /usr/sbin/svccfg import /var/svc/manifest/application/web/tomcat.xmlCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Use the following command to start tomcat:
/usr/sbin/svcadm enable tomcat6
# /usr/sbin/svcadm enable tomcat6Copy to Clipboard Copied! Toggle word wrap Toggle overflow
For further information about Jsvc, see the About Jsvc chapter of the HTTP Connectors and Load Balancing Guide .