How to Install and configure Jenkins on Ubuntu

Everything Linux, A.I, IT News, DataOps, Open Source and more delivered right to you.
Subscribe
"The best Linux newsletter on the web"

Introduction

Jenkins is an open source automation server. It helps automate the parts of software development related to buildingtesting, and deploying, facilitating continuous integration and continuous delivery.

Jenkins is a server-based system that runs in servlet containers such as Apache Tomcat. It supports version control tools, including AccuRevCVSSubversionGitMercurialPerforceClearCase and RTC, and can execute Apache AntApache Maven and sbt based projects as well as arbitrary shell scripts and Windows batch commands.

In this article, we will show you how to install Jenkins on Ubuntu Systems.

If you want to install Jenkins on CentOS 8 /RHEL 8, This article maybe useful (Jenkins On CentOS)

Installation

Just follow the steps below

  • Keep your server up to date
 sudo apt-get update -y &&  sudo apt-get upgrade -y
  • Install Java ( OpenJDK 11 ).
sudo apt-get install default-jre -y
  • Verify the installation by checking the Java version with the command below.
java -version
  •  Install Jenkins with these commands below.
wget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo apt-key add -

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

sudo apt-get update

sudo apt-get install -y jenkins

Note: The above commands will install LTS release. LTS is chosen every 12 weeks from the stream of regular releases as the stable release for that time period.

  • Start and enable Jenkins
systemctl start jenkins && systemctl enable jenkins
  • Configure the firewall by allowing port 8080 which is the default port that Jenkins listen on.
ufw allow 8080
  • Check if the port has been added or not
ufw status
  • Setup Jenkins, First we need to get the default administrator password, you can find it with the following command.
cat /var/lib/jenkins/secrets/initialAdminPassword
  • Access Jenkins by opening your browser then go to http://IP_address:8000 , you will_be directed as follow:
  • Copy your Admin Password from the shell then paste it and click continue button.
  • Here, you will be redirected that page which you can choose your customization for Jenkins, so i will choose the Install suggested plugins which will install all required apps and all needed plugins as shown below.
  • After the plugins installation finishes, you can create an admin user or you can just skip this steps and continue with the default admin user as shown below.
  • The Instance configuration will provide you the Jenkins URL, just click Save and finish as shown below.
  • The setup is complete as shown below, So click on Start using Jenkins
  • Finally, You will be directed to the Jenkins Dashboard as shown, So Enjoy with Jenkins.

Conclusion

That’s it …

So in this installation guide, we illustrated how to install and configure Jenkins on Ubuntu 20.04

Thanks

Everything Linux, A.I, IT News, DataOps, Open Source and more delivered right to you.
Subscribe
"The best Linux newsletter on the web"
MQ-Jr
MQ-Jr
unixcop Admin

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest articles

Join us on Facebook