Unable to install jenkins on CentOS instance

Please help me with this

update certificates
sudo yum update ca-certificates
or can be force using
sudo wget --no-check-certificate -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo

P.S.check you network settings as well

sudo wget -O /etc/yum.repos.d/jenkins.repo
https://pkg.jenkins.io/redhat-stable/jenkins.repo
sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io-2023.key
sudo dnf upgrade

Add required dependencies for the jenkins package

sudo dnf install fontconfig java-17-openjdk
sudo dnf install jenkins
sudo systemctl daemon-reload

I am using the above mentioned steps and facing error

Can you please share the error message you’re receiving?

Hi @apurva101

I just tried it on CentOS stream 9 Playground and it works as expected.

Could you please confirm the CentOS Version: cat /etc/os-release?

PS: Use this official docs to install Jenkins on CentOS

Hello Santosh,
It’s CentOS Linux release 8.2.2004 (Core)

Can you try this sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat-stable/jenkins.repo

I am not sure about this, but most Jenkins installations on CentOS 8 have used this package repo.

I think centOS 8 is the problem?

Yep. CentOS 8 is EOL, and the yum repositories have been taken down. Neither yum nor dnf will work correctly as a result. You should use CentOS 9 Stream, or other RedHat-compatible distribution based upon RHE 9.

1 Like

Thanks for your inputs. I’ll do likewise. :slight_smile: