Test environment: Oracle Enterprise Linux 5.8 64-bit virtual machine installed in VMware Workstation v9.0.2 software
Installation software: jdk-7u40-linux-x64.rpm+apache-tomcat-7.0.53.tar.gz
Installation instructions: Download jdk-7u40-linux-x64.rpm and apache-tomcat-7.0.53.tar.gz from the official website to the/u02 folder in the Linux virtual machine
Installation steps: Open the VMware virtual machine, use the root user to log into the Linux virtual machine, after entering the system, click the desktop right click, choose to open the terminal, run the following command.
First, install the JDK
rpm-ivh/u02/jdk-7u40-linux-x64.rpm
Java-version
CD/
Ii. installation of Tomcat
Rm-rf/usr/tomcat7
Cd/usr
Ls
CD/
Tar zxvf/u02/apache-tomcat-7.0.53.tar.gz
cd/root/apache-tomcat-7.0.53
Ls
CD/
MV APACHE-TOMCAT-7.0.53/USR/TOMCAT7
Cd/usr/tomcat7
Ls
chmod +X/USR/TOMCAT7
III. environment variable setting
Run the Vim/etc/profile command and add the environment variable code such as the following
#jdk Config
Export java_home=/usr/java/jdk1.7.0_40
Export Calsspath= $JAVA _home/lib/*.*
#tomcat Config
Export TOMCAT_HOME=/USR/TOMCAT7
Export CATALINA_HOME=/USR/TOMCAT7
#path Config
Export path= $PATH: $JAVA _home/bin: $TOMCAT _home/bin
Run instruction source/etc/profile Refresh environment variable
Iv. starting Tomcat
sh/usr/tomcat7/bin/startup.sh
Open the URL in Firefox http://localhost:8080 test
Close the tomcat command sh/usr/tomcat7/bin/shutdown.sh
V. Remove the installed Tomcat Test folder
Rm-rf/usr/tomcat7
Cd/usr
Ls