Upgrade Procedure
Pre-requisite: Running JetPatch 4.2.4 or 4.2.5 on EL7 or EL8
Step 1: Verify Installed Java Versions
First, identify which versions of Java are currently installed on your system:
java -version
This command displays the default Java version and lists all installed versions.
You can verify whether you are using OracleJDK or OpenJDK, along with its version, by executing this command as well:
java_version=$(java -version 2>&1) && if echo "$java_version" | grep -qi "openjdk"; then echo "OpenJDK $(echo "$java_version" | awk -F '"' '/version/ {print $2}' | sed 's/^1\.8\.0/8/')"; else echo "Oracle JDK $(echo "$java_version" | awk -F '"' '/version/ {print $2}' | sed 's/^1\.8\.0/8/')"; fi
Step 2: Install Java 11
OpenJDK 11 Installation:
If you use Java OpenJDK 11, then use the following command to install:
sudo yum install java-11-openjdk
Otherwise, Oracle JDK 11 Installation:
If not using OpenJDK, then use Oracle JDK 11 from the official Oracle website: Oracle JDK 11 Download Page At the time of writing, the package name for Oracle JDK 11 is jdk-11.0.22_linux-x64_bin.rpm
. To install this version, first download the .rpm
package and then execute:
sudo yum localinstall jdk-11.0.22_linux-x64_bin.rpm
Step 3: Configure Java 11 as Default
Set Java 11 as the default Java version for the system:
sudo update-alternatives --config java
Choose the option that corresponds to Java 11.
Verify by running
java -version
again to ensure Java 11 is selected as default.
Step 4: Remove Java Symlinks
NOTE: This is a VERY IMPORTANT step and MUST NOT be skipped.
To avoid conflicts, remove any existing Java symlinks in /usr/java
:
sudo rm -f /usr/java/default
sudo rm -f /usr/java/latest
Verify removal:
ls -l /usr/java
Step 5: Stop and Start the JetPatch App (Tomcat Service)
Stop the Tomcat Service:
NOTE: DO NOT USE the "restart" argument with systemctl.
sudo systemctl stop tomcat
Verify it has stopped:
sudo systemctl status tomcat
Start the Tomcat service:
sudo systemctl start tomcat
Confirm it's running without errors:
sudo systemctl status tomcat
Step 6: Confirm JetPatch is Running on Java 11
Verify that the Tomcat service is utilizing Java 11:
sed -n -e '/^JAVA_HOME=/p' -e '/^JAVA_MAJOR_VERSION=/p' /usr/share/tomcat/service/tomcat.conf
Ensure the output reflects Java 11 as the JAVA_HOME path.
Step 7: Verify JetPatch is still running as expected
Step 8: Remove Java 8 and Unsupported Versions (RECOMMENDED)
Locate the Java 8 or other unsupported Java versions for removal:
rpm -qa | grep -i -- 'java\|jre'
Use the sudo rpm -e --nodeps package_name
command to remove each package, replacing package_name
with the actual name of the Java 8 packages identified.
Note: there is no tab complete
Step 9: Upgrade to 4.2.6
Please take normal major version upgrade precautions (eg: take a backup/snapshot of your instance)
Point the Live Repo (edit the repo file) with the following (either EL7 or EL8)
https://live-repo.jetpatch.com/jetpatch/4-2-6/EL7
https://live-repo.jetpatch.com/jetpatch/4-2-6/EL8
Upgrade to this build and verify JetPatch is running after the upgrade (see this article if there are any issues)
Comments
0 comments
Please sign in to leave a comment.