Visit Azul.com Support

Install Azul Zulu on Alpine Linux

Table of Contents
Need help?
Schedule a consultation with an Azul performance expert.
Contact Us

This section explains how to install Azul Zulu Builds of OpenJDK on Alpine Linux.

Install from Azul’s APK repository

This section shows how to install Azul Zulu from the Azul APK repository using the apk package manager. Installing with the package manager requires root privileges. Log in as root or prefix the commands listed below with sudo.

  1. Set up the Azul APK repository:

     
    # add Azul's public key sudo wget -P /etc/apk/keys/ \ https://cdn.azul.com/public_keys/[email protected] # add the Azul APK repository echo "https://repos.azul.com/zulu/alpine" | sudo tee -a /etc/apk/repositories # update the list of packages sudo apk update
  2. Install the required Azul Zulu package.

    For example, to install Azul Zulu 11 JDK, run:

     
    sudo apk add zulu21-jdk
  3. To verify your installation, run the java -version command. You should see output similar to the following:

     
    $ 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)

Install from binary TAR.GZ file

You can download and use the binary tar.gz package, if necessary.

  1. Download the appropriate .tar.gz package for your OS from Azul Downloads.

  2. 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.gz

    Example 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
  3. Extract the package content into a folder.

     
    tar -xzvf <package>.tar.gz

    This command creates a folder named to match the installation package name without .tar.gz. This is your Azul Zulu installation folder.

  4. 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)
  5. (Optional) Add <installation_folder>/bin to your PATH environment variable, so that you can execute java from any directory without specifying the full path.

     
    export PATH=<installation_folder>/bin:$PATH