1. Download the Tomcat software package from the official website.
Http://tomcat.apache.org/
Click a version of download on the left. I chose tomcat6.x. You can choose to install it based on your actual situation. Click the hyper-connection and select the tar.gz (pgp, md5) Compressed package under Binary Distributions, download
2. Download the package to your local computer and decompress it.
# Tar zxvf apach-tomcat-6.0.16.tar.gz
# Music apach-tomcat-6.0.16/usr/local
3. Configure the Tomcat environment (ensure that jdk is installed)
# Vi/etc/profile
Export JAVA_HOME =/usr/local/jdk1.6.0 _ 04
Export TOMCAT_HOME =/usr/local/apach-tomcat-6.0.16
Save and exit
# Source/etc/profile // make the current configuration take effect immediately
4. Start the Tomcat server
$/Usr/local/apach-tomcat-6.0.16/bin/startup. sh
The following content appears on my computer:
Using CATALINA_BASE:/usr/local/apache-tomcat-6.0.16
Using CATALINA_HOME:/usr/local/apache-tomcat-6.0.16
Using CATALINA_TMPDIR:/usr/local/apache-tomcat-6.0.16/temp
Using JRE_HOME:/usr/local/jdk1.6.0 _ 04
5. Enter http: // localhost: 8080/in the browser to view the Tomcat log.
Tomcat installation ends here.