How to update Amazon Corretto 8 with new build

3.9k views Asked by At

I'm using Amazon Corretto 8u262 version in linux 64 bit. The team is releasing new build frequently with bug fixes and additional new features. Whenever new update released, manually downloaded new build and then uninstall the old JDK and install the new downloaded version. Whether there is any way or command in linux to update Corretto 8 to latest version without downloading manually.

2

There are 2 answers

0
Java with Jiva On

If you use a software package manager (yum, zypper, apk, etc) you can setup Corretto to auto-update when your package manager updates software. Instructions on how to set this up are available here: https://docs.aws.amazon.com/corretto/latest/corretto-8-ug/generic-linux-install.html

0
Yishai Galatzer On

Yes there is. Depending on what Linux you are using, you may use apt or yum to install new versions.

The instructions for 8 are here: https://docs.aws.amazon.com/corretto/latest/corretto-8-ug/generic-linux-install.html The instructions for 11 are here: https://docs.aws.amazon.com/corretto/latest/corretto-11-ug/generic-linux-install.html

In detail

Deb based (e.g. Ubuntu)

To use the Corretto Apt repositories on Debian-based systems, such as Ubuntu, import the Corretto public key and then add the repository to the system list by using the following commands:

wget -O- https://apt.corretto.aws/corretto.key | sudo apt-key add - sudo add-apt-repository 'deb https://apt.corretto.aws stable main' After the repository is added, you can install Corretto 8 by running this command:

sudo apt-get update; sudo apt-get install -y java-1.8.0-amazon-corretto-jdk

CentOs, RedHat, Amazon Linux, etc

To use Corretto RPM repositories with the yum package manager (such as Amazon Linux AMI), import the Corretto public key and then add the repository to the system list. For most systems, you must 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 After the repository is added, you can install Corretto 8 by running this command:

sudo yum install -y java-1.8.0-amazon-corretto-devel