Lecture 03 – JENKINS INSTALLATION

Jenkins_installation
hands-on_image

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 
				
			
Jenkinsinstall

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 -
				
			
Jenkinsinstall2

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'
				
			
Jenkinsinstall3

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 
				
			
Jenkinsinstall4

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
				
			
Jenkinsinstall5

Copy the password from there and paste it on the Jenkins server to unlock the page and continue

Jenkinsinstall6-1
Step 09. To customize Jenkins. Click on install suggested plugins and it may take some time to download.
Jenkinsinstall7
Jenkinsinstall16

Step 10. Complete the form below. Enter username as admin and password as admin123

Save and continue

Jenkinsinstall8

Step 11. Now Once Jenkins is ready, then click on Start using Jenkins.

Jenkinsinstall9

You should see the Jenkins Dashboard like below.

Jenkinsinstall10