How to Installation of Jenkins

Introduction:

Jenkins is a free and open-source automation server. It helps automate the parts of software development related to building, testing, and deploying, facilitating continuous integration and continuous delivery.

Prerequisites:

1.      One Ubuntu 18.04 server

2.      At least 1 GB of RAM.

3.      Java 8 installed ( we have also covered this part )

Step1: Install Jenkins

First, add the repository key to the system:

# wget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo apt-key add -

When the key is added, the system will return OK.

Append the Debian package repository address to the server’s sources.list:

# sudo sh -c 'echo deb https://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'

Now update the new repository.

# sudo apt-get update

Finally, install Jenkins and its dependencies:

# sudo apt-get install jenkins -y


Best DevOps Training Institute in Gurgaon...

Step 2 — Install java

There are multiple Java implementations that you can use. OpenJDK is the most popular.

Update your repository & and install java

# sudo apt update

# sudo apt install openjdk-8-jdk -y



Verify the Java version that you have installed.

# java --version


Step 3 — Starting Jenkins

Use this command to start jenkins.

# sudo systemctl start jenkins

Now you can check the status of service with this command.

# sudo systemctl status jenkins


Step 4 — Setting Up Jenkins

To set up your installation, visit Jenkins on its default port, 8080, using your server IP address:

Example:

http://your_server_ip:8080

Now you have to enter the initial password of Jenkins from the provided location on the screen.



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

Copy the 32-character alphanumeric password from the terminal and paste it into the Administrator password field, after that click Continue.

 



Best DevOps Training Institute in Noida...



Now you can click on install suggested plugins option, which will immediately begin the installation process: or you can also customize according to your requirements.



When the installation is complete, you will be prompted to set up the first administrative user. Now create an admin user.



Confirm either the domain name for your server or your server’s IP address: Click Save and Finish. You will see a confirmation page confirming that “Jenkins is Ready!”:

Click Start using Jenkins to open the main Jenkins dashboard:

 


Click Start using Jenkins to open the main Jenkins dashboard:



Learn DevOps Online Training and Get Best Offer on Online Training.

Thank for reading


Comments