The following is the whole process of installing JDK+TOMCAT8 in a centos6.5 virtual machine
1 to install tomcat You must install the JDK first.
2 JDK version selection, generally choose the standard version of Orcale, unless explicitly required.
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html This connection to see all the officially released JDK version
I downloaded it.
Http://download.oracle.com/otn-pub/java/jdk/8u91-b14/jdk-8u91-linux-x64.tar.gz
Note sometimes the download connection download with wget copy download will be unsuccessful, the reason is not known. Can be downloaded in the browser after the upload. Note When downloading the operating system is how many bits under the wrong installation will be problematic
3 Downloads tomcat8, if the development of the version is not required, I will generally download the penultimate new stable version.
this link can see all the official releases
Http://tomcat.apache.org/whichversion.html
I downloaded it.
Http://mirrors.hust.edu.cn/apache/tomcat/tomcat-8/v8.0.35/bin/apache-tomcat-8.0.35.tar.gz
4 Download the tomcat and jdk compression pack CP to /usr/local
5 Installing the JDK
extract jdk:cd/usr/local
TAR-XF jdk-8u91-linux-x64.gz
Set Environment variables:
Vim/etc/profile
At the end, add the following:
#JAVA
java_home=/usr/local/jdk1.8.0_91
Java_bin=/usr/local/jdk1.8.0_91/bin
Path= $PATH: $JAVA _bin
Classpath= $JAVA _home/lib/dt.jar: $JAVA _home/lib/tools.jar
Export Java_home java_bin PATH CLASSPATH
Effective Configuration: Source/etc/profile
6 test whether the installation was successful:
input command:java–version If the following message indicates a successful installation of the JDK
Java Version "1.8.0_91"
Java (TM) SE Runtime Environment (build 1.8.0_91-b14)
Java HotSpot (TM) 64-bit Server VM (build 25.91-b14, Mixed mode)
7 Installing TOMCAT8
Unzip the tomcat tarball:cd/usr/local
Tar-xfapache-tomcat-8.0.35.tar.gz
To set up a soft connection:ln-sapache-tomcat-8.0.35 tomcat8
Setting Environment variables:vim/etc/profile
at the end, add the following:
Exporttomcat_home=/usr/local/tomcat8
Export CATALINA_HOME=/USR/LOCAL/TOMCAT8
Effective Configuration: Source/etc/profile
8 starting Tomcat
cd/usr/local/tomcat8/bin/
./startup.sh indicates success if shown below
Using catalina_base:/usr/local/tomcat8
Using Catalina_home:/usr/local/tomcat8
Using Catalina_tmpdir:/usr/local/tomcat8/temp
Using Jre_home:/usr/local/jdk1.8.0_91
Using CLASSPATH:/usr/local/tomcat8/bin/bootstrap.jar:/usr/local/tomcat8/bin/tomcat-juli.jar
Tomcat started.
9 See if Tomcat is available
SS–ANLP See if the 8080,8009,8005 ports on Tomcat Monitor are listening
Service iptables stop to shut down the firewall.
use Curl to test locally if you can access the local 8080 Port curl-i127.0.0.1:8080
test Whether you can access over the network by using a browser http://ip:8080
This article is from the "bit accumulation" blog, please be sure to keep this source http://16769017.blog.51cto.com/700711/1786852
Installation of centos6.5 under JDK+TOMCAT8