CentOS 6.5 64-bit
Jdk-8u66-linux-x64.gz
Apache-tomcat-7.0.67.tar.gz
First, I'm using SECURECRT to connect to the server.
#rpm-qa | grep java
See the JDK that is already installed on this machine generally, there will be openjdk
Download OpenJDK
#rpm-E--nodeps java-1.6.0-openjdk-1.6.0.0-1.66.1.13.0.el6.x86_64#rpm-e--nodeps java_cup-0.10k-5.el6.x86_64#rpm-e --nodeps java-1.6.0-openjdk-devel-1.6.0.0-1.66.1.13.0.el6.x86_64#rpm-e--nodeps tzdata-java-2013g-1.el6.noarch# Rpm-e--nodeps java-1.5.0-gcj-1.5.0.0-29.1.el6.x86_64#rpm-e--nodeps gcc-java-4.4.7-16.el6.x86_64
Download Sun company JDK I was downloaded locally because I this weak chicken don't know how to get up and down on the server
Uploading to the JDK and Tomcat to the server, I used to build a folder in Windows to store the installation package, so I also built a new folder under Linux storage
This is a problem, where should this folder be built, on the internet to look up the home//is the user's main directory so let's go.
#mkdir/home/software_bak
#rz
And then we move them to the files I've stored in the installation
#mv jdk-8u66-linux-x64.gz Apache-tomcat-7.0.67.tar.gz/home/software_bak
Create a new Java and Tomcat file under/usr
#mkdir/usr/java
#mkdir/usr/tomcat
Move the installation files to the development folder
#mv/home/software_bak Jdk-8u66-linux-x64.gz/usr/java
#mv/home/software_bak Apache-tomcat-7.0.67.tar.gz/usr/tomcat
Install the JDK first
#cd/usr/java
# TAR-ZXVF Jdk-8u66-linux-x64.gz
Configure the environment variable bar
# Vim +/etc/profile (go in and press I then copy the contents in, Last click ESC, enter: Wq return)
# jdk8 Settingsjava_home=/usr/java/jdk1.8.0_66jre_home= $JAVA _home/jrepath= $PATH: $JAVA _home/bin: $JRE _home/ Binclasspath=: $JAVA _home/lib/dt.jar: $JAVA _home/lib/tools.jar: $JRE _home/libexport java_home jre_home PATH CLASSPATH
#source/etc/profile
Installing Tomcat
#cd Usr/tomcat
#tar-ZXVF apache-tomcat-7.0.67.tar.gz
I don't know if Tomcat is going to be configuring environment variables. I remember the Windows installation I do not configure I just let go of the firewall port open a few to see if you can access
The first time I got a firewall, I was going to go to the sky and tell you this. Don't add the rule to the last line of the firewall configuration and open the MySQL port.
#vi/etc/sysconfig/iptables
Reboot, take effect
#service iptables Restart
MD, engaged in a half-day, unexpectedly can't open the site, the original is Tomcat port has not changed
#vi Tomcat/apache-tomcat-7.0.67/conf/server.xml
Change 8080 to 80
But I am so distressed. Telnet can't get through. I'm going to the sky. The result is a little cold on the platform, thinking that the original was not started Tomcat, so I came down again
#cd/usr/tomcat/apache-tomcat-7.0.67
#bin/startup.sh
I can open it, too.
Centos installation JDK Tomcat