How to install Jenkins on RHEL or CentOS ?
In this post, we will see how to install Jenkins on a RHEL or CentOS system.
The steps are very easy and are quoted very well in below official Jenkins guide.
https://pkg.jenkins.io/redhat-stable/
Lets see the two steps quickly here.
1. Download the repository file.
[approot@ngelinux001 it]# wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo --no-check-certificate --2022-08-02 04:27:06-- https://pkg.jenkins.io/redhat-stable/jenkins.repo Resolving pkg.jenkins.io (pkg.jenkins.io)... 151.101.42.133, 2a04:4e42:a::645 Connecting to pkg.jenkins.io (pkg.jenkins.io)|151.101.42.133|:443... connected. WARNING: cannot verify pkg.jenkins.io's certificate, issued by ‘/C=US/O=Let's Encrypt/CN=R3’: Issued certificate has expired. HTTP request sent, awaiting response... 200 OK Length: 85 Saving to: ‘/etc/yum.repos.d/jenkins.repo’ 100%[======================================================================================>] 85 --.-K/s in 0s 2022-08-02 04:27:06 (8.06 MB/s) - ‘/etc/yum.repos.d/jenkins.repo’ saved [85/85]
2. Import the Jenkins Key.
[approot@ngelinux001 it]# rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key
3. Now we are good to check and install the jenkins package.
[approot@ngelinux001 it]# yum list jenkins Loaded plugins: aliases, changelog, kabi, langpacks, product-id, search-disabled-repos, subscription-manager, tmprepo, verify, : versionlock This system is not registered with an entitlement server. You can use subscription-manager to register. Loading support for Red Hat kernel ABI jenkins | 2.9 kB 00:00:00 jenkins/primary_db | 42 kB 00:00:00 Available Packages jenkins.noarch 2.346.2-1.1 jenkins [approot@ngelinux001 it]# [approot@ngelinux001 it]# yum install jenkins
Now the Jenkins will be installed on the system.
And we can access the packages offered by Jenkins officially.