How to Install and configure Jenkins on CentOS 8 / RHEL 8

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 building, testing, and deploying, facilitating continuous integration and continuous delivery.

Jenkins is based on Java and helps with every part of the software development process.

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.

Installation

Just follow the steps below

  • Keep your server up to date
dnf update -y &&  dnf upgrade -y
  • Install Java ( OpenJDK 11 )
dnf install java-11-openjdk -y
  • Install Jenkins the automation server.
dnf install -y jenkins

Note: If you couldn’t find Jenkins server on repos on your Linux Server, You can add it, Just follow the steps below to add the Jenkins repository.

You can add the repo in 2 ways:

(1) Add it with command below.

wget --O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat-stable/jenkins.repo

It should display /etc/yum.repos.d/jenkins.repo saved.

(2) Add it manually.

vim /etc/yum.repos.d/jenkins.repo

Add the following then save and quit.

[jenkins]
name=Jenkins-stable
baseurl=http://pkg.jenkins.io/redhat
gpgcheck=1

Import the GPG key

rpm --import https://pkg.jenkins.io/redhat/jenkins.io.key

Final step to install Jenkins

dnf install jenkins -y
  • 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.
firewall-cmd --permanent --zone=public --add-port=8080/tcp 
firewall-cmd --reload
  • Setup Jenkins, First we need to get the default administrator password, you can find it with the following command. (The location is displayed on the Getting Started / Unlock Jenkins page.)
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.
  • 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 CentOS 8

    Also You can visit this article to install Jenkins on Ubuntu system. (Jenkins on Ubuntu).

    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