This article mainly introduces the common operations of tomcat under linux. Friends who need it can refer to it
Assume that tomcat is installedin /usr/local/tomcat7
Start tomcat
cd /usr/local/tomcat7/bin ./startup.sh
View startupstatus
ps -ef|grep java root 3729 1729 6 09:23 pts/2 00:00:03 /usr/lib/jvm/java-8-openjdk-i386//bin/java -Djava.util.logging.config.file=/usr/local/tomcat7/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.tls.ephemeralDHKeySize=2048 -Djava.endorsed.dirs=/usr/local/tomcat7/endorsed -classpath /usr/local/tomcat7/bin/bootstrap.jar:/usr/local/tomcat7/bin/tomcat-juli.jar -Dcatalina.base=/usr/local/tomcat7 -Dcatalina.home=/usr/local/tomcat7 -Djava.io.tmpdir=/usr/local/tomcat7/temp org.apache.catalina.startup.Bootstrap start dafu71 3770 3706 0 09:24 pts/2 00:00:00 grep --color=auto java
Kill tomcat process:
kill -9 3729
Check the startup status again
ps -ef|grep java root 3777 3706 0 09:26 pts/2 00:00:00 grep --color=auto java
Start tomcat again
./startup.sh
View log
Enter tomcat/logs
##
cd ../ cd logs tail -f catalina.out
ctr+z
cd /usr/local/tomcat7/bin ./shutdown.sh ps -ef | grep 解释
-e The effect of this parameter is the same as specifying the "A" parameter.
-f Display UID, PPIP, C and STIME fields.
The grep command is to find the | in the middle of
. The pipe command means that the ps command and grep are executed at the same time. Get the operation permission of a foldersudo chmod -R 777 文件夹路径
The above is the detailed content of Introduction to how to use tomcat under linux. For more information, please follow other related articles on the PHP Chinese website!