Gist for https://youtu.be/2-L0WohfsqY
From CentOS/RHEL/Fedora Instructions:
- Create RPM repository
cat <<EOF > /etc/yum.repos.d/adoptium.repo
[Adoptium]
name=Adoptium
baseurl=https://packages.adoptium.net/artifactory/rpm/${DISTRIBUTION_NAME:-$(. /etc/os-release; echo $ID)}/\$releasever/\$basearch
enabled=1
gpgcheck=1
gpgkey=https://packages.adoptium.net/artifactory/api/gpg/key/public
EOF
-
Install Temurin 11 (this will fail)
dnf -y install temurin-11-jdk
-
Modify
/etc/yum.repos.d/adoptium.repo
- change
rocky/$releasever
torocky/8
- change
-
Install Temurin 11 (this will succeed)
dnf -y install temurin-11-jdk
From Jenkins Redhat Packages:
-
Create RPM repository
wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo
-
Add repository key
rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key
-
Install Jenkins
dnf -y install jenkins
systemctl --full status jenkins
systemctl edit jenkins
[Service]
Environment="JAVA_OPTS=-Djava.awt.headless=true -Djava.net.preferIPv4Stack=true -Djava.io.tmpdir=/var/cache/jenkins/tmp/ -Dorg.apache.commons.jelly.tags.fmt.timeZone=America/New_York -Duser.timezone=America/New_York"
Environment="JENKINS_OPTS=--pluginroot=/var/cache/jenkins/plugins"
mkdir -p /var/cache/jenkins/tmp
chown -R jenkins:jenkins /var/cache/jenkins/tmp
systemctl show jenkins
systemd-analyze verify jenkins.service
systemctl start jenkins
systemctl --full status jenkins
journalctl -u jenkins
Thanks for these great instructions and the YouTube video.. Super helpful!
One minor error above, it should be "systemctl --full status jenkins" on the second to last line. Looks like a "long dash" has got in there instead of two short dashes.