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 zulu11-jdk
  3. To verify your installation, run the java -version command. You should see output similar to the following:

     
    $ java -version openjdk version "11.0.10" 2021-01-19 LTS OpenJDK Runtime Environment Zulu11.45+27-CA (build 11.0.10+9-LTS) OpenJDK 64-Bit Server VM Zulu11.45+27-CA (build 11.0.10+9-LTS, mixed mode)

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 zulu11.45.27-ca-jdk11.0.10-linux_x64.tar.gz 0bd85593bae021314378f3b146cfe36a6c9b0afd964d897c34201034ace3e785 zulu11.45.27-ca-jdk11.0.10-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 "11.0.10" 2021-01-19 LTS OpenJDK Runtime Environment Zulu11.45+27-CA (build 11.0.10+9-LTS) OpenJDK 64-Bit Server VM Zulu11.45+27-CA (build 11.0.10+9-LTS, mixed mode)
  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