Step 1: Download below repo
[root@ip-172-31-18-18 ~]# sudo wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo
--2025-09-03 10:08:33-- https://pkg.jenkins.io/redhat-stable/jenkins.repo
Resolving pkg.jenkins.io (pkg.jenkins.io)... 146.75.38.133, 2a04:4e42:56::645
Connecting to pkg.jenkins.io (pkg.jenkins.io)|146.75.38.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 85
Saving to: ‘/etc/yum.repos.d/jenkins.repo’
/etc/yum.repos.d/jenkins.repo 100%[===================================================================================>] 85 --.-KB/s in 0s
2025-09-03 10:08:33 (2.71 MB/s) - ‘/etc/yum.repos.d/jenkins.repo’ saved [85/85]
===================================================
Step 2: Download key
[root@ip-172-31-18-18 ~]# sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io-2023.key
==========================================
Step 3:- Install java
[root@ip-172-31-18-18 ~]# sudo yum install fontconfig java-21-openjdk
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered with an entitlement server. You can use "rhc" or "subscription-manager" to register.
Last metadata expiration check: 0:03:37 ago on Wed Sep 3 10:08:57 2025.
Package fontconfig-2.15.0-7.el10.x86_64 is already installed.
============================================
Step 4:- Install Jenkin now
[root@ip-172-31-18-18 ~]# sudo yum install jenkins
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered with an entitlement server. You can use "rhc" or "subscription-manager" to register.
Last metadata expiration check: 0:03:58 ago on Wed Sep 3 10:08:57 2025.
============================================================
Step 5:- Start the Jenkins
[root@ip-172-31-18-18 ~]# sudo systemctl daemon-reload
[root@ip-172-31-18-18 ~]# sudo systemctl enable jenkins
Created symlink '/etc/systemd/system/multi-user.target.wants/jenkins.service' → '/usr/lib/systemd/system/jenkins.service'.
[root@ip-172-31-18-18 ~]# sudo systemctl start jenkins
[root@ip-172-31-18-18 ~]# sudo systemctl status jenkins
● jenkins.service - Jenkins Continuous Integration Server
Loaded: loaded (/usr/lib/systemd/system/jenkins.service; enabled; preset: disabled)
Active: active (running) since Wed 2025-09-03 10:13:52 UTC; 19s ago
Invocation: 7cec58f4a86b4ad98baa29275db3c9f4
Main PID: 14143 (java)
Tasks: 42 (limit: 5687)
Memory: 452.6M (peak: 462.1M)
CPU: 14.054s
CGroup: /system.slice/jenkins.service
===================================================
Step 6:- Now access the Jenkings by using public ip and port 8080
http://52.90.54.118:8080/
/var/lib/jenkins/secrets/initialAdminPassword
No comments:
Post a Comment