First, install the JDK
1. Download JDK
Second, decompression
Tar-xvzf jdk-7u79-linux-x64.tar.gz
Third, Vi/etc/profile
Add the following configuration
Export java_home=/home/jdk/jdk1.7.0_79
Export JRE_HOME=/HOME/JDK/JDK1.7.0_79/JRE
Exportclasspath=.: $JAVA _home/lib/dt.jar: $JAVA _home/lib/tools.jar: $JRE _home/lib: $CLASSPATH
Export path= $JAVA _home/bin: $PATH
Iv. making the configuration file effective
Source Profile
V. Check if the JDK is installed successfully
Java-version
4. Install Tomcat
1. Download Tomcat
2. Decompression
Tar-xvzf apache-tomcat-7.0.76.tar.gz
3. Enter the following directory
Cd/home/tomcat/apache-tomcat-7.0.76/bin
4. Start Tomcat
./bin/startup.sh
Vi. Opening the firewall
Vi/etc/sysconfig/iptables
Add open 8080 Port
Seven, restart the firewall
Service Iptables Restart
Eight. Check if Tomcat is installed successfully
Installing Tomcat under Linux