Steps to Install Jenkins on AWS EC2 Linux Instance #aws #linux

Step 1. Firstly, add Jenkins repository using wget, so that yum get to know where to install Jenkins from.

yum update -y
sudo yum install wget
sudo amazon-linux-extras install java-openjdk11
sudo amazon-linux-extras install epel -y        

Step 2. Now, let’s add the Jenkins GPG key to our trusted keys, so that we will be able to verify/trust the files that are being sourced (while installing Jenkins) are from the trusted site.


sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.rep
sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key
sudo yum install jenkinso        

Step 3. Jenkins services need to be started, with the following command:

sudo service jenkins start        

Step 4. Make sure to open port 8080 (default port to which Jenkins listen)

Step 5. Go to your browser and connect to Jenkins via default port 8080 http://<IP_address>:8080 IP_address: you can use the public DNS of your ec2 Linux instance. You can also use public DNS of your ec2 linux instance instead of IP_address.

Step 6. To unlock Jenkins fetch the administrator password by typing the following command:

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



To view or add a comment, sign in

More articles by Parth Shah

Explore content categories