I did it the other day, so I made a note of how to do it. Almost the same content as the reference site.
--Linux environment (CentOS6 this time)
Follow the steps below to change the JDK and Tomcat versions.
sudo service tomcat6 stop
sudo /etc/rc.d/init.d/tomcat6 stop
sudo chkconfig tomcat6 off
yum list installed | grep tomcat
sudo yum remove -y tomcat6 tomcat6-webapps tomcat6-admin-webapps apache-tomcat-apis.noarch tomcat6-el-2.1-api.noarch tomcat6-jsp-2.1-api.noarch tomcat6-lib.noarch tomcat6-servlet-2.5-api.noarch
yum list installed | grep jdk
sudo yum remove -y java-1.7.0-openjdk.i686 java-1.7.0-openjdk-devel.i686
Download and transfer the JDK tar file from the following address
http://www.oracle.com/technetwork/java/javase/downloads/index.html
tar xvf jdk-8u5-linux-i586.gz
sudo mv jdk1.8.0_05 /usr/local/java/jdk1.8.0_05
cd /usr/local/java/
sudo ln -s jdk1.8.0_05 jdk
export JAVA_HOME="/usr/local/java/jdk"
Remove pre-installed java and javac symlinks
cd /usr/bin
sudo rm java
sudo rm javac
Create by downloading the symbolic link and specifying it in the set location
sudo ln -s $JAVA_HOME/bin/java java
sudo ln -s $JAVA_HOME/bin/javac javac
It is OK if it is the installed version.
java -version
javac -version
Download Tomcat 8 here. tomcat8 download page http://tomcat.apache.org/download-80.cgi
Download the binary distribution tar file
tar -xvzf apache-tomcat-8.0.9.tar.gz
sudo mv apache-tomcat-8.0.9 /usr/local/tomcat8
sudo /usr/local/tomcat8/bin/startup.sh
http://localhost:8080
When updating the latest version of JDK and Tomcat installed on CentOS with yum
Recommended Posts