Introduction to how to use tomcat under linux

零下一度
Release: 2017-06-17 11:00:49
Original
1857 people have browsed it

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
Copy after login

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
Copy after login

Kill tomcat process:


kill -9 3729
Copy after login

Check the startup status again


ps -ef|grep java
root  3777 3706 0 09:26 pts/2  00:00:00 grep --color=auto java
Copy after login

Start tomcat again


./startup.sh
Copy after login

View log

Enter tomcat/logs


##

cd ../
cd logs
tail -f catalina.out
Copy after login

Termination viewing


ctr+z
Copy after login

Stop tomcat service


cd /usr/local/tomcat7/bin
./shutdown.sh
ps -ef | grep 解释
Copy after login

ps: Display a certain process

-A Display all programs.

-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 folder


sudo chmod -R 777 文件夹路径
Copy after login
The three permissions of reading, writing, and running can be represented by numbers, that is, r=4, w=2, x=1.

rw-r--r-- is expressed as 644 numerically.

777 is rwxrwxrwx, which means that the logged-in user (you can view it with the command id),

his group and others have the highest permissions

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!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!