Linux Apps Tutorials - Herong's Tutorial Examples - v1.03, by Herong Yang
Start/Stop Apache Tomcat
This section provides a tutorial example on how to start and stop Apache Tomcat on Linux systems.
Apache Tomcat provides a number scripts for you to start/stop the Tomcat server and invoke other tools:
-rwxr-x---. 1 23445 Mar 19 20:49 catalina.sh -rwxr-x---. 1 1997 Mar 19 20:49 ciphers.sh -rwxr-x---. 1 1922 Mar 19 20:49 configtest.sh -rwxr-x---. 1 8319 Mar 19 20:49 daemon.sh -rwxr-x---. 1 1965 Mar 19 20:49 digest.sh -rwxr-x---. 1 3382 Mar 19 20:49 makebase.sh -rwxr-x---. 1 1970 Mar 19 20:49 migrate.sh -rwxr-x---. 1 3941 Mar 19 20:49 setclasspath.sh -rwxr-x---. 1 1902 Mar 19 20:49 shutdown.sh -rwxr-x---. 1 1904 Mar 19 20:49 startup.sh -rwxr-x---. 1 4600 Mar 19 20:49 tool-wrapper.sh -rwxr-x---. 1 1908 Mar 19 20:49 version.sh
1. Try "startup.sh" to start the Tomcat server:
herong$ sudo $TOMCAT_HOME/bin/startup.sh ... Tomcat started.
2. Open Tomcat home page on the default port 8080 in a Web browser: http://localhost:8080. You should see this message displayed on the page: "If you're seeing this, you've successfully installed Tomcat. Congratulations!".
3. If Tomcat home page is not showing up, you may need to review log messages and the configuration file. See next tutorial for examples of common issues.
herong$ tail $TOMCAT_HOME/logs/catalina.out herong$ more $TOMCAT_HOME/conf/server.xml
4. Verify the background process that runs the Tomcat server:
herong$ ps -elf | grep tomcat 0 S root 890928 ... /usr/bin/java -Djava.util.logging.config.file=/opt/tomcat/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Dorg.apache.catalina.security.SecurityListener.UMASK=0027 --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED -classpath /opt/tomcat/bin/bootstrap.jar:/opt/tomcat/bin/tomcat-juli.jar -Dcatalina.base=/opt/tomcat -Dcatalina.home=/opt/tomcat -Djava.io.tmpdir=/opt/tomcat/temp org.apache.catalina.startup.Bootstrap start
5. Run "shutdown.sh" to stop the Tomcat server:
herong$ $TOMCAT_HOME/bin/shutdown.sh
Table of Contents
Running Apache HTTP Server (httpd) on Linux Systems
►Running Apache Tomcat on Linux Systems
Install Apache Tomcat on Linux
Common Issues on Running Tomcat
Turn on SSL/TLS Support on Tomcat
SSL/TLS Support on Tomcat 8 or Older
Running PHP Scripts on Linux Systems
Running MySQL Database Server on Linux Systems
Running Python Scripts on Linux Systems
Conda - Environment and Package Manager