Score:0

Centos 7 OpenJDK Upgrade Confusion

kn flag

Wanted to pick someone else’s brain on an issue I’m having and getting nowhere with.

We have an older Linux server in our environment and I am looking to patch our openjdk to the Latest versions but cannot seem to wrap my head around the process.

We are on Centos 7, running openjdk 11.0.14, wanting to move up to 11.0.15 and eventually beyond once we can test that our applications are stable with each major jump.

yum list available java* only displays up to 11.0.14 then jumps straight to 17.0.2 however I just want to patch to the highest v11.

Java -version produces: openjdk version "11.0.14.1" 2022-02-08 LTS OpenJDK Runtime Environment 18.9 (build 11.0.14.1+1-LTS) OpenJDK 64-Bit Server VM 18.9 (build 11.0.14.1+1-LTS, mixed mode, sharing)

Initially I thought about doing an alternate install so that I can switch between versions as needed so I downloaded 11.0.15 from oracle and extracted it into the current install location and ran the alternatives — install command however it fails with the message: the primary link for Java must be usr/bin/Java.

When I run “which Java” I get bin/Java but the symbolic link is under usr/lib/Java.

I'm not sure how to proceed, should I remove the previous version before proceeding? I am also not certain about if I am upgrading with correct openjdk verison to avoid any issues. Do I get the download from Oracle or do I use opendjk archives?

Score:0
cn flag

Oracle Java requires a paid license, and they are checking for compliance. Server Fault is not a place to discuss licensing terms, but you should know what you are getting into.

CentOS or Enterprise Linux packages are Red Hat's build of OpenJDK. Advantage of using the same method of installing as other things in the distro, from the people who brought you RHEL. Disadvantage that it may lag behind upstream, as it takes some time for maintainers to reach a scheduled update, get a build done for RHEL and CentOS.

Read the release notes for Java 11.0.15 to see what exactly you are missing. There is a chance it is not significant. You may be able to take the minor update when it happens as a part of regular software patching, with brief testing.

Should you need an alternative version than the rpm package, you don't have to leave Red Hat. Their OpenJDK install options include a tar archive. However don't install tar archives to the same place as the rpm. Extract non rpm packages somewhere like /opt that do not affect the system packages.

Java 8, 11, and 17 are long term support releases. Reference support roadmap via endoflife.date. At the moment you have a choice from either of them, all are packaged in CentOS and upstream. Allows for some time to prepare an upgrade to 17 or maybe 21.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.