Lecture 03 – JENKINS INSTALLATION
JENKINS INSTALLATION
Launch an AWS EC2 Ubuntu Instance & execute the following commands:
Step 01. To update server
COPY & RUN –> $ the below command
sudo apt-get update
Step 02. Install JavaJDK
COPY & RUN –> $ the below command
sudo apt install openjdk-11-jdk
Step 03. Download Jenkins key into repository
COPY & RUN –> $ the below commands
sudo apt-get install -y ca-certificates
wget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo apt-key add -
Step 04. To download Debian pkg binary files.
COPY & RUN –> $ the below command
sudo sh -c 'echo deb https://pkg.jenkins.io/debian-stable binary/ > \
/etc/apt/sources.list.d/jenkins.list'
Step 05: Long Term Support release
A LTS (Long-Term Support) release is chosen every 12 weeks from the stream of regular releases as the stable release for that time period. It can be installed from the debian-stable apt repository.
COPY & RUN –> $ the below command
curl -fsSL https://pkg.jenkins.io/debian-stable/jenkins.io-2023.key | sudo tee \
/usr/share/keyrings/jenkins-keyring.asc > /dev/null
echo deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc] \
https://pkg.jenkins.io/debian-stable binary/ | sudo tee \
/etc/apt/sources.list.d/jenkins.list > /dev/null
sudo apt-get update
Step 06: Install Jenkins
COPY & RUN –> $ the below command
sudo apt-get install jenkins
To verify if Jenkins successfully installed
COPY & RUN –> $ the below command
service jenkins status
Press q to exit
Step 07. Go to your AWS EC2, copy the public IP into browser and add colon 8080
Your EC2 IP look like this 173.643.54:8080
Step 08: To unlock Jenkins by copying the password.
COPY & RUN –> $ the below command
sudo cat /var/lib/jenkins/secrets/initialAdminPassword
Copy the password from there and paste it on the Jenkins server to unlock the page and continue
Step 10. Complete the form below. Enter username as admin and password as admin123
Save and continue
Step 11. Now Once Jenkins is ready, then click on Start using Jenkins.
You should see the Jenkins Dashboard like below.
