How to configure Jenkins and java-openjdk11 in AWS EC2 Linux 2 – updated Nov 2020

Amazon Linux 2

DevOps CI/CD class starts:

Get a $50.00 OFF, if you enroll now. 

Watch the Video Here and see the step by step instructions below:

Installing Jenkins and Java 11 in AWS EC2 Instance


  • You already have an AWS EC2 LINUX 2 Instance Up and Running
  • The Security Groups in your instance has the 8080 PORT open
  • You already SSH or PUTTY into your instance

Note:  The amazon-linux-extras command only work on instances created with the AWS EC2 LINUX 2 AMIs and will not run on AWS EC2 LINUX

AWS EC2 Instance

Step 1: Install Java Open JDK

sudo amazon-linux-extras install -y java-openjdk11

Step 2: Install Java Open JDK

java -version

Step 3: Add the Jenkins Repo

sudo wget -O /etc/yum.repos.d/jenkins.repo

Step 4: Add the Jenkins keys to download the Jenkins build

sudo rpm --import

Step 5: Install the Jenkins Build

sudo yum install -y jenkins

Step 6: Enable the service to start

sudo chkconfig jenkins on

Step 7: Start Jenkins

sudo service jenkins start

Step 8: Open your local browser and enter


Step 9: To get the initial password, open or cat your initial admin password file:

sudo cat /var/lib/jenkins/secrets/initialAdminPassword

Leave a Reply

Your email address will not be published. Required fields are marked *


Enjoy this blog? Please spread the word :)