How to install Jenkins on Oracle Linux 8.8
- 00:36 cat /etc/os-release
- 00:55 yum install java-11-openjdk-devel -y
- 01:53 java -version
- 02:13 sudo rpm --import
- 02:30 wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.repo
- 02:45 yum install jenkins* -y
- 03:20 systemctl enable jenkins
- 03:45 systemctl Start jenkins
- 04:56 systemctlStatus jenkins
- 05:16 firewall-cmd --add-port=8080/tcp --permanent
- 05:20 firewall-cmd --reload
- 06:50 vi /var/lib/jenkins/secrets/initialAdminPassword
To Install Jenkins On Oracle Linux 8.8
Introduction:
A Jenkins plugin allows Continuous Integration to be performed using an open-source automation tool written in Java. Using Jenkins, you can continuously build and test your software projects, making it easier for developers to integrate changes and easier for users to obtain a fresh build.
Procedure
Step 1: First check the OS version by using the below command.
[root@linuxhelp ~]# cat /etc/os-release
NAME="Oracle Linux Server"
VERSION="8.8"
ID="ol"
ID_LIKE="fedora"
VARIANT="Server"
VARIANT_ID="server"
VERSION_ID="8.8"
PLATFORM_ID="platform:el8"
PRETTY_NAME="Oracle Linux Server 8.8"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:oracle:linux:8:8:server"
HOME_URL="https://linux.oracle.com/"
BUG_REPORT_URL="https://github.com/oracle/oracle-linux"
ORACLE_BUGZILLA_PRODUCT="Oracle Linux 8"
ORACLE_BUGZILLA_PRODUCT_VERSION=8.8
ORACLE_SUPPORT_PRODUCT="Oracle Linux"
ORACLE_SUPPORT_PRODUCT_VERSION=8.8
Step 2: Install java package by using the below command.
[root@linuxhelp ~]# yum install java-11-openjdk-devel -y
Last metadata expiration check: 0:00:08 ago on Thursday 20 July 2023 07:05:28 PM IST.
Dependencies resolved.
================================================================================================================================================================================================================
Package Architecture Version Repository Size
================================================================================================================================================================================================================
Installing:
java-11-openjdk-devel x86_64 1:11.0.19.0.7-4.0.1.el8 ol8_appstream 3.4 M
Installing dependencies:
copy-jdk-configs noarch 4.0-2.el8 ol8_appstream 30 k
java-11-openjdk x86_64 1:11.0.19.0.7-4.0.1.el8 ol8_appstream 472 k
java-11-openjdk-headless x86_64 1:11.0.19.0.7-4.0.1.el8 ol8_appstream 41 M
javapackages-filesystem noarch 5.3.0-1.module+el8+5136+7ff78f74 ol8_appstream 30 k
lksctp-tools x86_64 1.0.18-3.el8 ol8_baseos_latest 100 k
ttmkfdir x86_64 3.0.9-54.el8 ol8_appstream 62 k
tzdata-java noarch 2023c-1.el8 ol8_appstream 186 k
xorg-x11-fonts-Type1 noarch 7.5-19.el8 ol8_appstream 522 k
Enabling module streams:
javapackages-runtime 201801
Transaction Summary
================================================================================================================================================================================================================
Install 9 Packages
Total download size: 46 M
Installed size: 185 M
Downloading Packages:
(1/9): copy-jdk-configs-4.0-2.el8.noarch.rpm 331 kB/s | 30 kB 00:00
(2/9): lksctp-tools-1.0.18-3.el8.x86_64.rpm 985 kB/s | 100 kB 00:00
(3/9): java-11-openjdk-11.0.19.0.7-4.0.1.el8.x86_64.rpm 2.3 MB/s | 472 kB 00:00
(4/9): javapackages-filesystem-5.3.0-1.module+el8+5136+7ff78f74.noarch.rpm 549 kB/s | 30 kB 00:00
(5/9): ttmkfdir-3.0.9-54.el8.x86_64.rpm 1.0 MB/s | 62 kB 00:00
(6/9): tzdata-java-2023c-1.el8.noarch.rpm 1.6 MB/s | 186 kB 00:00
(7/9): xorg-x11-fonts-Type1-7.5-19.el8.noarch.rpm 2.9 MB/s | 522 kB 00:00
(8/9): java-11-openjdk-headless-11.0.19.0.7-4.0.1.el8.x86_64.rpm 27 MB/s | 41 MB 00:01
(9/9): java-11-openjdk-devel-11.0.19.0.7-4.0.1.el8.x86_64.rpm 2.1 MB/s | 3.4 MB 00:01
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 28 MB/s | 46 MB 00:01
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Running scriptlet: copy-jdk-configs-4.0-2.el8.noarch 1/1
Running scriptlet: java-11-openjdk-headless-1:11.0.19.0.7-4.0.1.el8.x86_64 1/1
Preparing : 1/1
Installing : tzdata-java-2023c-1.el8.noarch 1/9
Installing : ttmkfdir-3.0.9-54.el8.x86_64 2/9
Installing : xorg-x11-fonts-Type1-7.5-19.el8.noarch 3/9
Running scriptlet: xorg-x11-fonts-Type1-7.5-19.el8.noarch 3/9
Installing : javapackages-filesystem-5.3.0-1.module+el8+5136+7ff78f74.noarch 4/9
Installing : copy-jdk-configs-4.0-2.el8.noarch 5/9
Installing : lksctp-tools-1.0.18-3.el8.x86_64 6/9
Running scriptlet: lksctp-tools-1.0.18-3.el8.x86_64 6/9
Installing : java-11-openjdk-headless-1:11.0.19.0.7-4.0.1.el8.x86_64 7/9
Running scriptlet: java-11-openjdk-headless-1:11.0.19.0.7-4.0.1.el8.x86_64 7/9
Installing : java-11-openjdk-1:11.0.19.0.7-4.0.1.el8.x86_64 8/9
Running scriptlet: java-11-openjdk-1:11.0.19.0.7-4.0.1.el8.x86_64 8/9
Installing : java-11-openjdk-devel-1:11.0.19.0.7-4.0.1.el8.x86_64 9/9
Running scriptlet: java-11-openjdk-devel-1:11.0.19.0.7-4.0.1.el8.x86_64 9/9
Running scriptlet: copy-jdk-configs-4.0-2.el8.noarch 9/9
Running scriptlet: java-11-openjdk-headless-1:11.0.19.0.7-4.0.1.el8.x86_64 9/9
Running scriptlet: java-11-openjdk-1:11.0.19.0.7-4.0.1.el8.x86_64 9/9
Running scriptlet: java-11-openjdk-devel-1:11.0.19.0.7-4.0.1.el8.x86_64 9/9
Verifying : lksctp-tools-1.0.18-3.el8.x86_64 1/9
Verifying : copy-jdk-configs-4.0-2.el8.noarch 2/9
Verifying : java-11-openjdk-1:11.0.19.0.7-4.0.1.el8.x86_64 3/9
Verifying : java-11-openjdk-devel-1:11.0.19.0.7-4.0.1.el8.x86_64 4/9
Verifying : java-11-openjdk-headless-1:11.0.19.0.7-4.0.1.el8.x86_64 5/9
Verifying : javapackages-filesystem-5.3.0-1.module+el8+5136+7ff78f74.noarch 6/9
Verifying : ttmkfdir-3.0.9-54.el8.x86_64 7/9
Verifying : tzdata-java-2023c-1.el8.noarch 8/9
Verifying : xorg-x11-fonts-Type1-7.5-19.el8.noarch 9/9
Installed:
copy-jdk-configs-4.0-2.el8.noarch java-11-openjdk-1:11.0.19.0.7-4.0.1.el8.x86_64 java-11-openjdk-devel-1:11.0.19.0.7-4.0.1.el8.x86_64
java-11-openjdk-headless-1:11.0.19.0.7-4.0.1.el8.x86_64 javapackages-filesystem-5.3.0-1.module+el8+5136+7ff78f74.noarch lksctp-tools-1.0.18-3.el8.x86_64
ttmkfdir-3.0.9-54.el8.x86_64 tzdata-java-2023c-1.el8.noarch xorg-x11-fonts-Type1-7.5-19.el8.noarch
Complete!
Step 3: Check the Java Version by using the below command.
[root@linuxhelp ~]# java -version
openjdk version "11.0.19" 2023-04-18 LTS
OpenJDK Runtime Environment (Red_Hat-11.0.19.0.7-2.0.1) (build 11.0.19+7-LTS)
OpenJDK 64-Bit Server VM (Red_Hat-11.0.19.0.7-2.0.1) (build 11.0.19+7-LTS, mixed mode, sharing)
Step 4: Import the repository key from Jenkins by using the below command
[root@linuxhelp ~]# sudo rpm --import https://pkg.jenkins.io/redhat/jenkins.io-2023.key
Step 5: Add the repository on the system by using the below command
[root@linuxhelp ~]# wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.repo
--2023-07-20 19:11:18-- http://pkg.jenkins-ci.org/redhat/jenkins.repo
Resolving pkg.jenkins-ci.org (pkg.jenkins-ci.org)... 52.202.51.185
Connecting to pkg.jenkins-ci.org (pkg.jenkins-ci.org)|52.202.51.185|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://pkg.jenkins.io/redhat/jenkins.repo [following]
--2023-07-20 19:11:19-- https://pkg.jenkins.io/redhat/jenkins.repo
Resolving pkg.jenkins.io (pkg.jenkins.io)... 151.101.2.133, 151.101.66.133, 151.101.130.133, ...
Connecting to pkg.jenkins.io (pkg.jenkins.io)|151.101.2.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 71
Saving to: ‘/etc/yum.repos.d/jenkins.repo’
/etc/yum.repos.d/jenkins.repo 100%[===================================================================================================================>] 71 --.-KB/s in 0s
2023-07-20 19:11:19 (1.90 MB/s) - ‘/etc/yum.repos.d/jenkins.repo’ saved [71/71]
Step 6: Install Jenkins by using the below command.
[root@linuxhelp ~]# yum install jenkins* -y
Jenkins 209 kB/s | 110 kB 00:00
Dependencies resolved.
================================================================================================================================================================================================================
Package Architecture Version Repository Size
================================================================================================================================================================================================================
Installing:
jenkins noarch 2.415-1.1 jenkins 85 M
Transaction Summary
================================================================================================================================================================================================================
Install 1 Package
Total download size: 85 M
Installed size: 85 M
Downloading Packages:
jenkins-2.415-1.1.noarch.rpm 18 MB/s | 85 MB 00:04
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 18 MB/s | 85 MB 00:04
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Running scriptlet: jenkins-2.415-1.1.noarch 1/1
Installing : jenkins-2.415-1.1.noarch 1/1
Running scriptlet: jenkins-2.415-1.1.noarch 1/1
Verifying : jenkins-2.415-1.1.noarch 1/1
Installed:
jenkins-2.415-1.1.noarch
Complete!
Step 7: Enable Start and Check the Status of Jenkins by using the below command
[root@linuxhelp ~]# systemctl enable jenkins
Synchronizing state of jenkins.service with SysV service script with /usr/lib/systemd/systemd-sysv-install.
Executing: /usr/lib/systemd/systemd-sysv-install enable jenkins
Created symlink /etc/systemd/system/multi-user.target.wants/jenkins.service → /usr/lib/systemd/system/jenkins.service.
[root@linuxhelp ~]# systemctl start jenkins
[root@linuxhelp ~]# systemctl status jenkins
● jenkins.service - Jenkins Continuous Integration Server
Loaded: loaded (/usr/lib/systemd/system/jenkins.service; enabled; vendor preset: disabled)
Active: active (running) since Thu 2023-07-20 19:31:52 IST; 9s ago
Main PID: 7434 (java)
Tasks: 50 (limit: 22856)
Memory: 1.1G
CGroup: /system.slice/jenkins.service
└─7434 /usr/bin/java -Djava.awt.headless=true -jar /usr/share/java/jenkins.war --webroot=/var/cache/jenkins/war --httpPort=8080
Jul 20 19:31:22 mail jenkins[7434]: Jenkins initial setup is required. An admin user has been created and a password generated.
Jul 20 19:31:22 mail jenkins[7434]: Please use the following password to proceed to installation:
Jul 20 19:31:22 mail jenkins[7434]: e7fa1e0cba9c49ff890efae3a255d66a
Jul 20 19:31:22 mail jenkins[7434]: This may also be found at: /var/lib/jenkins/secrets/initialAdminPassword
Jul 20 19:31:22 mail jenkins[7434]: *************************************************************
Jul 20 19:31:52 mail jenkins[7434]: 2023-07-20 14:01:52.675+0000 [id=28] INFO jenkins.InitReactorRunner$1#onAttained: Completed initialization
Jul 20 19:31:52 mail jenkins[7434]: 2023-07-20 14:01:52.707+0000 [id=22] INFO hudson.lifecycle.Lifecycle#onReady: Jenkins is fully up and running
Jul 20 19:31:52 mail systemd[1]: Started Jenkins Continuous Integration Server.
Jul 20 19:31:53 mail jenkins[7434]: 2023-07-20 14:01:53.671+0000 [id=46] INFO h.m.DownloadService$Downloadable#load: Obtained the updated data file for hudson.tasks.Maven.MavenInstaller
Jul 20 19:31:53 mail jenkins[7434]: 2023-07-20 14:01:53.672+0000 [id=46] INFO hudson.util.Retrier#start: Performed the action check updates server successfully at the attempt #1
Step 8: Add the port Number in Firewall by using the below command
[root@linuxhelp ~]# firewall-cmd --add-port=8080/tcp --permanent
success
[root@linuxhelp ~]# firewall-cmd --reload
success
[root@linuxhelp ~]# firewall-cmd --list-all
public (active)
target: default
icmp-block-inversion: no
interfaces: ens160
sources:
services: cockpit dhcpv6-client ssh
ports: 8080/tcp
protocols:
forward: no
masquerade: no
forward-ports:
source-ports:
icmp-blocks:
rich rules:
Step 9: Open the browser and enter the IP address with port number as shown in the below images

Step 10: Copy the Password to Unlock Jenkins by using the below command
[root@linuxhelp ~]# vi /var/lib/jenkins/secrets/initialAdminPassword
Step 11: Install Plugins and Create Admin user as shown in the below images

Step 12: This is the Dashboard of Jenkins

Conclusion:
We have reached the end of this article. In this guide, we have walked you through the steps required to Install Jenkins on Oracle Linux 8.8. Your feedback is much welcome.
Comments ( 0 )
No comments available