Intro to Tomcat's management in Linux
19 Jan 2017
- In Linux, Tomcat can be typically installed at a few possible location such as
Note : At KWT server, Tomcat is installed at /var/lib/tomcat8/
2. Tomcat has a few Environment Variables
$CATALINA_HOME : where Tomcat is installed
$CATALINA_BASE : same as CATALINA_HOME
$CATALINA_PID : location of pid file for Tomcat running process (will discuss later)
3. To start Tomcat, usually we can run : “$CATALINA_HOME/bin/catalina.sh start”
4. Once Tomcat is running, the pid of the Tomcat process is writen into a file which is declared in $CATALINA_PID.
Typically value for $CATALINA_PID is $CATALINA_BASE\bin\catalina.pid
When you open this file, (run “less $CATALINA_BASE\bin\catalina.pid”), you will see the pid of the Tomcat process
5. You stop Tomcat process by running : “kill -kill 1239” (replace 1239 with the pid of the process)
This is a generic Linux’s way of killing any process.
6. Typically, to stop Tomcat, you run “$CATALINA_HOME/bin/shutdown.sh start”
NOTE : To add more : Logging, folder structure, manager, host manager, multiple instance, users, server setting</div>