DEV Community

Aravind kumar TS
Aravind kumar TS

Posted on • Updated on

How to install Jenkins !!

Step 1 - Prerequisites

Navigate to https://www.jenkins.io/
Choose Documents - https://www.jenkins.io/doc/book/installing/linux/
Understand the Pre-requisites. To run Jenkins on Host we need Java to be installed.

Step 2 - Install updates and Java

. apt-get install update
. apt-get install openjdk-11-jre

Step 3 - Installing Jenkins packages

.
curl -fsSL https://pkg.jenkins.io/debian-stable/jenkins.io.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

copy,paste above package download command as a whole and hit enter

. apt-get install jenkins

Step 4 : You need to open ports in system firewall

. ufw enable
. ufw allow 8080
. ufw reload
. ufw status -- wait for a while till this command throws open ports
. ufw allow openssh

step 5 : Start Jenkins and unlock Jenkins

. systemctl start jenkins
. systemctl status jenkins -- it should show the status as active

. cat /var/lib/jenkins/secrets/initialAdminPassword --- Note down this password

. In your browser navigate to https://your_ip_address_of_machine:8080

step 6 : Setup Jenkins

Image description

Remember or note down your admin username and passsword

Step 7 : Choose install plugins

Choose your plugins, thus I have integrated Jenkins with Github

Image description

step 8 : To be continued ...

Top comments (0)