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 directory in the Linux virtual machine
Installation steps: Open the VMware virtual machine, log on to the Linux virtual machine with the root user, after entering the system, click the desktop right click, choose to open the terminal, execute 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
Third, set environment variables
To execute the vim/etc/profile command, add the environment variable code as follows
#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
Execute instruction source/etc/profile Refresh environment variable
Iv. starting Tomcat
sh/usr/tomcat7/bin/startup.sh
Open URL http://localhost:8080 test in Firefox browser
Close the tomcat command sh/usr/tomcat7/bin/shutdown.sh
V. Remove the installed Tomcat test catalog
Rm-rf/usr/tomcat7
Cd/usr
Ls