JDK Download Address
Http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
Tomcat Download Address http://tomcat.apache.org/download-80.cgi One, JDK environment installation 1.1 View JDK Environment
[Root@gtawiki ~]# java-version
java Version "1.7.0_121"
OpenJDK Runtime Environment (rhel-2.6.8.1.el6_8-x86_ U121-B00)
OpenJDK 64-bit Server VM (build 24.121-b00, Mixed mode)
1.2 Uninstall self-with JDK
System with jdk1.7, now we want to load 1.8, at this time can detect openjdk related files and delete it.
[Root@gtawiki ~]# rpm-qa|grep java
java-1.6.0-openjdk-1.6.0.40-1.13.12.6.el6_8.x86_64
java-1.7.0-openjdk-1.7.0.121-2.6.8.1.el6_8.x86_64
Tzdata-java-2016j-1.el6.noarch
[Root@gtawiki ~]# rpm-e--nodeps java-1.6.0-openjdk-1.6.0.40-1.13.12.6.el6_8.x86_64
[Root@gtawiki ~]# rpm-e-- Nodeps java-1.7.0-openjdk-1.7.0.121-2.6.8.1.el6_8.x86_64
[root@gtawiki ~]# rpm-e--nodeps Tzdata-java-2016j-1.el6.noarch
1.3 Installation jdk1.8
Upload the downloaded jdk1.8 to the directory/usr/local/java and unpack.
[Root@gtawiki java]# TAR-ZXVF jdk-8u111-linux-x64.gz
1.4 Configuring environment Variables
View Profiles Profile
[Root@gtawiki java]# Vi/etc/profile
Modify the configuration file, add Java_home, classpath configuration, and modify path. As follows
#jdk Configure
java_home=/usr/local/java/jdk1.8.0_111
classpath=.: $JAVA _home/lib/dt.jar: $JAVA _home/lib/ Tools.jar
path= $PATH: $NGINX _home: $JAVA _home/bin
export java_home
export CLASSPATH
export PATH
Save and exit. 1.5 Make the configuration file effective, view JDK
The following source/etc/profile, after the configuration file is in effect, check that the JDK is installed successfully
[Root@gtawiki java]# source/etc/profile
[root@gtawiki java]# java-version
java version ' 1.8.0_111 '
java ( TM) SE Runtime Environment (build 1.8.0_111-b14)
Java HotSpot (tm) 64-bit Server VM (build 25.111-b14, Mixed mode)
second, the installation of Tomcat
2.1 Upload Compression package apache-tomcat-8.0.39.tar.gz to/usr/local, decompression
2.2 Start Tomcat
[Root@gtawiki local]# cd apache-tomcat-8.0.39
[Root@gtawiki apache-tomcat-8.0.39]#./bin/catalina.sh start
2.3 View Log
[Root@gtawiki apache-tomcat-8.0.39]# tail-f Logs/catalina.out
Third, nginx installation configuration
See another article
http://blog.csdn.net/u010416588/article/details/54379282