Document directory
Install JDK
To install Tomcat, you must first install JDK (go to the official website to download the latest version)
After installing JDK, You need to configure its environment variables as follows:
To take effect for all users, you must modify the/etc/profile file, but you must have the root user permission;
If you only have the permission of the test user, perform the following Configuration:
1. Modify the/home/test/. bash_profile File
Add the following content to the file:
Export java_home =/home/test/local/jdk1.5.x _ xx // JDK installation path
Export classpath = $ java_home/lib: $ java_home/JRE/lib :.
Export Path = $ java_home/bin: $ java_home/JRE/bin: $ path
2. Exit and save
3. Run the following command in shell:
$ Source ~ /. Bash_profile // make the environment variable configuration take effect
Tomcat installation Configuration
1. Download apache-tomcat-6.0.10.tar.gz
2. # tar-zxvf apache-tomcat-6.0.10.tar.gz; // unzip
3. # cp-r APACHE-Tomcat-6.0.10/home/test/local/tomcat; // copy APACHE-Tomcat-6.0.10 to/home/test/local/and rename it Tomcat
4)/home/test/tomcat/bin/startup. Sh; // start Tomcat
Display using catalina_base:/usr/local/tomcat
Using catalina_home:/usr/local/tomcat
Using catalina_temdir:/usr/local/tomcat/temp
Using java_home:/usr/Java/jdk1.6.0 _ 01
Now That tomcat has been installed, visit http: // localhost: 8080 in the browser. The default Tomcat page appears, indicating that the installation is successful.