First, perform Tomcat's related script Catalina Tomcat primary script, which will execute the java command to call Tomcat and stop the alias of the SHUTDOWN CATALINA STOP to stop Tomcat. (The default port 8080 of the Tomcat HTTP server) STARTUP CATALINA START alias for starting Tomcat. (Default port 8005) of Tomcat Stop Server 8005) SetClassPath is used for the internal interior of the system to set Tomcat's ClassPath environment variables.
When performing Catalina, a parameter must be included with Start, STOP, RUN. When you use the Catalina and Start option, or call the Startup script instead of using the parameter run, you will see the first few lines of the header Using ...; the rest of the output information is redirected to the log file of Catalina.out . Therefore, when you want to see the output at startup, the Run parameter will help, but do not redirect standard output and errors. There are still a few startup parameters: -config Specifies another server.xml configuration file - Nonaming deactivated JNDI-SECURITY enabled Catalina.Policy files in Tomcat - Embedded Tomcat -jpda Start Tomcat started in the embedded mode In accordance with the debugging environment of Java Platform Debugger Architecture, Tomcat's Environment Variable Catalina_base Sets Tomcat In the Basic Directory where Tomcat is located. . The default is the Tomcat installation directory. CATALINA_OPTS command line options passed to the java command JAVA_OPTS CATALINA_OPTS alias set JAVA_HOME location of the Java environment JSSE_HOME setting for HTTPS in Java Secure SocketsExtension position JPDA_ADDRESS set for JPDA address catalina jpda start command, the default value 8000
The Java runtime environment has restrictions such as "maximum stack size". The options for the Java command allow you to control these limitations, for example: Java -Xmx = 64M MyProg will perform class files called MyProg at maximum 64MB of memory. When using Tomcat, because the execution servlet may occupy a lot of memory in the Java environment, if this or other option is passed to the Java command that starts Tomcat, you can set the option in environment variables Catalina_OPTS before performing the startup script of Tomcat. . For example: export catalina_opts = "- xmx = 128m" (Linux) SET CATALINA_OPTS = "- xmx = 128m" (MS-DOS) is best added to the environment variable, Linux is added to the / etc / profile file : Export catalina_opts = "- xmx = 128m" Third, Tomcat installed after testing and forced stop 1, check if Tomcat is running: # ps auwwx | grep catalina.startup.bootstrap (on Linux or * BSD) You should look Go to several Java processes. This PS command is looking for any remaining Tomcat processes on Tomcat JVM. 2, when Tomcat does not stop normally, if you want to force it to end, you can pass the SIGTERM signal to the process you discovery, tell the VM end process (please make sure you have the right user rights): # Kill -sigterm