How to Upgrade Jdk-7 to Jdk-8 (Linux) + Cloudera Cluster

In this section you will able to learn how to upgrade jdk7 to jdk8 (Linux) + cloudera cluster
Step 1: ssh to all hosts and be the root user and stop cloudera cluster
upgrade jdk8 into cloudera cluster
sudo -i
Step 2: Download Jdk8 tarball from oracle website Download JDK From Here
If you dont have wget installed use below command
sudo yum install wget -y

wget --no-check-certificate -c --header "Cookie: oraclelicense=accept-securebackup-cookie"
Step 3: untar tarball
tar -xvzf jdk-8u181-linux-x64.tar.gz

Step 4: Move extract folder to /usr/java Directory
mv jdk1.8.0_181 /usr/java/

Step 5: Then one by one run following commands
alternatives --install /usr/bin/java java /usr/java/jdk1.8.0_181/bin/java 2

alternatives --config java

alternatives --install /usr/bin/jar jar /usr/java/jdk1.8.0_181/bin/jar 2

alternatives --install /usr/bin/javac javac /usr/java/jdk1.8.0_181/bin/javac 2

alternatives --set jar /usr/java/jdk1.8.0_181/bin/jar

alternatives --set javac /usr/java/jdk1.8.0_181/bin/javac

Step 6: Set profile file
vi /etc/profile
Step 7: Copy paste following code and save (:wq)
export JAVA_HOME=/usr/java/jdk1.8.0_181

export JRE_HOME=/usr/java/jdk1.8.0_181/jre

export PATH=$PATH:/usr/java/jdk1.8.0_181/bin:/usr/java/jdk1.8.0_181/jre/bin
Step 8: Load file using source
source /etc/profile
Step 9: Check java version updated or not
java -version
Step 10: Congratulation you have successfully updated java version
Step 11: First Start cloudera management services
upgrade jdk8 into cloudera cluster
Step 12: Start cloudera cluster
upgrade jdk8 into cloudera cluster
If you want to know more checkout my youtube channel
Update Jdk 7 to Jdk 8 Cloudera