|
Test environment: VMware Workstation v9.0.2 software installed Oracle Enterprise Linux 5.8 64-bit virtual machine
Install the 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 to Linux virtual machine / u02 directory from the official website
Installation steps: Open the VMware virtual machine, using the root user login Linux virtual machine, into the system, point the desktop right click and select Open Terminal, execute the following command.
First, install the JDK
rpm -ivh /u02/jdk-7u40-linux-x64.rpm
java -version
cd /
Second, install 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 the environment variable
Execute vim / etc / profile command, add the environment variable code is 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
Instruction source / etc / profile refresh environment variables
Fourth, start Tomcat
sh /usr/tomcat7/bin/startup.sh
Open the URL http in Firefox browser: // localhost: 8080 test
Close Tomcat command sh /usr/tomcat7/bin/shutdown.sh
V. deleted Tomcat installation test directory
rm -rf / usr / tomcat7
cd / usr
ls |
|
|
|