Test environment: Install Oracle Enterprise Linux 5.8 64-bit Virtual Machine in VMware Workstation v9.0.2
Install software: jdk-7u40-linux-x64.rpm?apache-tomcat-7.0.53.tar.gz
Installation instructions: Download jdk-7u40-linux-x64.rpmand apache-atat-7.0.53.tar.gz from the official network to the/u02 directory of the Linux Virtual Machine
Installation Procedure: Open the vmwarevm, log on to the Linux VM as the root user, right-click the system, right-click the desktop, choose terminal, and execute the following command.
1. Install JDK
Rpm-ivh/u02/jdk-7u40-linux-x64.rpm
Java-version
Cd/
Ii. install Tomcat
Rm-rf/usr/tomcat7
Tar zxvf/u02/apache-tomcat-7.0.53.tar.gz
Cd/root/apache-tomcat-7.0.53
Cd/usr/tomcat7
3. Set Environment Variables
Run the vim/etc/profile command and add the environment variable Code as follows:
# Jdk config
Execute Command source/etc/profile to refresh environment variable
4. start Tomcat
Sh/usr/tomcat7/bin/startup. sh
Open the URL http: // localhost: 8080 in Firefox to test
Disable Tomcat command sh/usr/tomcat7/bin/shutdown. sh
5. Delete the installed Tomcat test directory
Rm-rf/usr/tomcat7