Created
July 22, 2022 06:28
-
-
Save bnikanjam/92e385eb6352eabd5c94af95156e8683 to your computer and use it in GitHub Desktop.
Install latest Java LTS and MAven on Amazon Linux 2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Install and select the latest Java LTS on Amazon Linux 2 | |
# Install Maven | |
# Install latest Java LTS | |
sudo yum install java | |
echo "Select the latest Java LTS" | |
sudo alternatives --config java | |
# Download Maven | |
sudo wget http://repos.fedorapeople.org/repos/dchen/apache-maven/epel-apache-maven.repo -O /etc/yum.repos.d/epel-apache-maven.repo | |
sudo sed -i s/\$releasever/6/g /etc/yum.repos.d/epel-apache-maven.repo | |
# Install Maven | |
sudo yum install -y apache-maven | |
mvn --version |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment