Install Azul Zulu on RPM-based Linux (RHEL, SLES, Oracle Linux)
This section explains how to install Azul Zulu Builds of OpenJDK on RPM-based Linux distributions. Azul provides RPM packages for RHEL, SLES, and Oracle Linux.
Install from Azul RPM repository
This section shows how to set up Azul’s RPM repository and install Azul Zulu using your package manager.
Note
|
The Azul repository contains RPM packages for the x86 and ARM64 architectures. If your machine has a different CPU architecture (for example, ARM32), consider installing the appropriate TAR.GZ package. You can find TAR.GZ packages for all supported platforms on the Downloads page. |
Installing with a package manager requires root
privileges.
Log in as root
or use sudo
to execute the commands listed below.
-
Set up the Azul RPM repository.
For RHEL or Oracle Linux:
# add the Azul RPM repository sudo yum install -y https://cdn.azul.com/zulu/bin/zulu-repo-1.0.0-1.noarch.rpmFor SLES:
# download the package that adds Azul's RPM repository curl -O https://cdn.azul.com/zulu/bin/zulu-repo-1.0.0-1.noarch.rpm # import Azul's public key sudo rpm --import https://www.azul.com/wp-content/uploads/2021/05/0xB1998361219BD9C9.txt # install the package sudo zypper install zulu-repo-1.0.0-1.noarch.rpm -
Install the required Azul Zulu package.
For RHEL or Oracle Linux:
# install Azul Zulu 21 JDK sudo yum install zulu21-jdkFor SLES:
# install Azul Zulu JDK 21 sudo zypper install zulu21-jdkThe default installation folder is:
/usr/lib/jvm/java-<major_version>-zulu-openjdk-caFor example, the default installation folder for Azul Zulu JDK 21 is:
/usr/lib/jvm/java-21-zulu-openjdk-ca -
(Optional) You may want to add the
<installation_folder>/bin
to yourPATH
environment variable so you can runjava
without typing the full path.export PATH=<installation_folder>/bin:$PATH
Install Azul Zulu RPM package
You can download the RPM package and install it using a package manager.
-
Download the RPM package for your OS from Azul Downloads.
-
Verify that the checksum of the downloaded file matches the value provided on the download page. To calculate the checksum, use this command:
sha256sum <zulu_package>.rpmHere is an example output:
$ sha256sum zulu21.36.17-ca-jdk21.0.4-linux.x86_64 4ac676f55418b18b18268bf206c4970ecd16a3a8073ecbab20b78c86c346a7ef zulu21.36.17-ca-jdk21.0.4-linux.x86_64 -
Install the package using the package manager of your OS. Using the package manager requires root privileges. Log in as
root
or usesudo
to execute the commands listed below.For RHEL or Oracle Linux:
sudo yum install <package>.rpmFor SLES:
sudo zypper install <package>.rpm
Install from binary TAR.GZ file
You can download and use the binary tar.gz
package, if necessary.
-
Download the appropriate
.tar.gz
package for your OS from Azul Downloads. -
Verify that the checksum of the file matches the value provided on the download page. To calculate the checksum, use this command:
sha256sum <package>.tar.gzExample output:
$ sha256sum zulu21.36.17-ca-jdk21.0.4-linux_x64.tar.gz 318d0c2ed3c876fb7ea2c952945cdcf7decfb5264ca51aece159e635ac53d544 zulu21.36.17-ca-jdk21.0.4-linux_x64.tar.gz -
Extract the package content into a folder.
tar -xzvf <package>.tar.gzThis command creates a folder named to match the installation package name without
.tar.gz
. This is your Azul Zulu installation folder. -
Verify that the package was unpacked successfully by running the following command:
$ <installation_folder>/bin/java -version openjdk version "21.0.4" 2024-07-16 LTS OpenJDK Runtime Environment Zulu21.36+17-CA (build 21.0.4+7-LTS) OpenJDK 64-Bit Server VM Zulu21.36+17-CA (build 21.0.4+7-LTS, mixed mode, sharing) -
(Optional) Add
<installation_folder>/bin
to yourPATH
environment variable, so that you can executejava
from any directory without specifying the full path.export PATH=<installation_folder>/bin:$PATH