This example uses the centos6.5 version, the specific content is as follows
First, the official download tomcat service
http://tomcat.apache.org/download-70.cgi
Second, to upload Tomcat to the Linux server
I set up a rommr folder under the root directory generally put in the/usr/directory, look at their own.
To begin the installation step
1. Get permission: chmod +x apache-tomcat-7.0.67.tar.gz
2. Decompression: Tar zxvf apache-tomcat-7.0.67.tar.gz
3. Rename: MV apache-tomcat-7.0.67 tomcat7
III. Configuration Environment Edit/etc/profile file
java_home=/rommr/jdk1.6.0_45
path= $JAVA _home/bin: $PATH
classpath=.: $JAVA _home/lib/dt.jar: $JAVA _home/ Lib/tools.jar
Catalina_home=/rommr/tomcat7 #其他的是jdk配置 Important is that this
export java_home catalina_home #这点ok
Export PATH
Export CLASSPATH
Execute after configuration: Source/etc/profile configuration file is in effect
Four, start Tomcat into the Tomcat bin directory
./startup.sh start./shutdown.sh shutdown command
sh tomcat7/bin/startup.sh can also be started as follows:
After starting the command, enter on the browser: http:\\localhost:8080\ If you need to write an IP address on an external access http:\\192.168.38.128:8080\ you can see Tomcat information
Five, Linux operation Tomcat Some common commands
1. Check to see if Tomcat is closed: Ps-ef|grep Java is as follows:
2. Kill the Tomcat process: kill-9 1999 after killing, look back at the following:
3. View Log
Go to tomcat/logs Directory execution Command tail-f catalina.out can view log information dynamically
4. Use Netstat-tln to view port information Sometimes we start Tomcat access. This time we can use it to see if we have 8080 of this port.
Find the specified run Port command: Netstat-an | grep ': 8080 '
The above is the entire content of this article, I hope to help you to achieve the successful Linux installation tomcat, thank you for your reading.