How to install Java 11 Amazon Corretto on RedHat 8 / CentOS 8 / AlmaLinux 8

To install Java 11 (Amazon Corretto) on RHEL8 machines, you can run the following commands:

$ sudo rpm --import https://yum.corretto.aws/corretto.key
$ sudo curl -L -o /etc/yum.repos.d/corretto.repo https://yum.corretto.aws/corretto.repo
$ sudo yum install -y java-11-amazon-corretto-devel

After running the above commands, check if Java 11 is successfully installed:

$ java -version

openjdk version "11.0.15" 2022-04-19 LTS
OpenJDK Runtime Environment Corretto-11.0.15.9.1 (build 11.0.15+9-LTS)
OpenJDK 64-Bit Server VM Corretto-11.0.15.9.1 (build 11.0.15+9-LTS, mixed mode)

That’s it!

By Leendert de Borst

Freelance software architect with 10+ years of experience. Expert in translating complex problems into creative & simple technical solutions.

Leave a comment

Your email address will not be published.