1, download Apache Tomcat
Download Address: http://tomcat.apache.org/download-70.cgi
FileName: apache-tomcat-7.0.27.tar.gz
Put the downloaded installation package in the server's/tmp directory
2. Start installing Apache Tomcat
[Root@c1091test tmp]# TAR-XZVF apache-tomcat-7.0.27.tar.gz//Decompression
[Root@c1091test tmp]# MV Apache-tomcat-7.0.27/usr/local/tomcat//move uncompressed files to/usr/local/tomcat
[Root@c1091test tmp]# cd/usr/local/tomcat/Enter Tomcat directory
[Root@c1091test tomcat]# LS//view Tomcat directory
Bin Lib Logs release-notes temp work
conf LICENSE NOTICE RUNNING.txt WebApps
Apache Tomcat installation is complete, is actually a decompression process. The following opens Apache Tomcat and the Apache Tomcat writes to the boot run queue:
(1, Apache Tomcat launch command:/usr/local/tomcat/bin/startup.sh
(2, Apache Tomcat stop command:/usr/local/tomcat/bin/shutdown.sh
(3, Apache Tomcat boot start setting: Echo "/usr/local/tomcat/bin/startup.sh" >>/etc/rc.local
3. Configure Tomcat Environment variables
Edit ~/.bash_profile Add Tomcat environment parameters
Tomcat_home=/usr/local/tomcat
Export PATH java_home CLASSPATH tomcat_home
Save exit, then execute source ~/.bash_profile, let environment variable take effect
Now start the Tomcat service:/usr/local/tomcat/bin/startup.sh
Then enter the NETSTART–TNL for listening, and if you can see 8080 and 80,092, it means Tomcat has started normally.
The following is an access test to see if you can access the Web page: http://localhost:8080, you can see the Web page to show that Tomcat has been installed successfully.