Steps to upgrade java on Linux/AIX/Unix Production Servers.

Today in this article we will look at steps how to update Java RPM on any linux server.

There are two approaches of this task.

I. First approach:- Update from Yum repository.
Create a new repo with latest Java/JRE/JDK packages and update using below command.

# yum update jre1.7

 

II. Second Approach
In this approach, we will download the packages from Oracle Java website.

1.  Get required java version from Oracle Java website.
In case of 1.8u281, get it from below url:

https://www.oracle.com/sg/java/technologies/javase-jre8-downloads.html

2. Now upload the package on the required server.

3. Take backup of /usr/java to some other directory.

4. Update RPM package.

# rpm -Uvh jdk1.7.rpm
Or,
# yum update jdk1.7 --nogpgcheck

5. make sure to copy any extension that exists with old version of java to copy in new java “ext” directory.
Say for example:-
cp /usr/java/jdk1.7.0_171/jre/lib/ext/nCipherKM-12.00.jar /usr/java/jdk1.7.0_241-amd64/jre/lib/ext/nCipherKM-12.00.jar

6. Change permissions of the new file copied.
# chmod 644 /usr/java/jdk1.7.0_241-amd64/jre/lib/ext/nCipherKM-12.00.jar

7. Restart any java applications on server.

8. Now check the new java version.

# java -version
0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments