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 AccuRev, CVS, Subversion, Git, Mercurial, Perforce, ClearCase and RTC, and can execute Apache Ant, Apache 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.
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.
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.)
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).