HOWTO: Upgrade the version of Java running on your preservation node

From Adpnwiki
Jump to: navigation, search

The LOCKSS Development Team released a new version of the LOCKSS daemon on 3 February 2021 (version 1.75.5). One of the changes to the software is that new versions of LOCKSS no longer support Java 7. All machines getting updated versions of LOCKSS will need to have Java 8 or later installed, or else LOCKSS will not start.

If you run an ADPNet Preservation Node, and you know you need, or might need, to upgrade the version of Java installed on your machine, here is a check-list for how to check that.

Note. To upgrade the version of Java running on your preservation node, you will need command-line access (usually through SSH) and administrator privileges (access to the `root` account or to the `sudo` command-line tool) on your LOCKSS box.

  • If you don't have that, or if you don't know what it would mean to have that, reach out to the ADPNet TPC for help with this task.
  • If you do have that, choose the process for the OS distribution you are running.


CentOS/RHEL 7

The process for systems running on CentOS/RHEL 7 is described at lockss.github.io Upgrading Java. Quoting:

Upgrading to Java 8

Beginning with version 1.75, the classic LOCKSS daemon requires Java 8. This page outlines the process to upgrade from Java 7 to Java 8.

Upgrade instructions

This document outlines the upgrade process for CentOS/RHEL 7 only. For CentOS/RHEL 6 and below these instructions will not work. Please email lockss-support@lockss.org for further instructions.

1. Check the currently installed Java version:

    java -version

If the output indicates a version number beginning with 1.8, Java 8 is already installed, no further action is needed. Example:

    openjdk version "1.8.0_265"
    OpenJDK Runtime Environment (build 1.8.0_265-b01)
    OpenJDK 64-Bit Server VM (build 25.265-b01, mixed mode)

If the output indicates a version number beginning with 1.7, Java 7 needs to be uninstalled and Java 8 installed. Example:

    java version "1.7.0_221"
    OpenJDK Runtime Environment (rhel-2.6.18.0.el7_6-x86_64 u221-b02)
    OpenJDK 64-Bit Server VM (build 24.221-b02, mixed mode)

2. Login as root (or gain root privilege)

3. Stop the LOCKSS daemon:

    systemctl stop lockss

4. Uninstall Java 7; the two versions can live alongside each other but we recommend uninstalling Java 7:

    yum remove java-1.7.0-openjdk
    yum remove java-1.7.0-openjdk-headless

If you installed the Java 7 JDK, remove it too:

    yum remove java-1.7.0-openjdk-devel

5. Install the Java 8 JRE:

    yum install java-1.8.0-openjdk

6. Verify that Java 8 is installed by checking the version number:

    java -version

7. Restart the LOCKSS daemon:

    systemctl start lockss

Other Distributions

If you are running earlier versions of CentOS or RHEL, or if you are using another distribution like Ubuntu or Debian, contact ADPNet TPC or LOCKS Support for help.