Jenkins installation requires the use of the root account or the account has sudo permissions on CentOS 8. Because Jenkins is written in Java, so it is necessary to install the Java environment
1, install OpenJDK.
DNF install the Java-1.8.0 sudo openjdk-devel-
2, to enable Jenkins repository. Run the following command to download and import the GPG key
sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat-stable/jenkins.repo
sudo RPM --import HTTPS : //jenkins-ci.org/redhat/jenkins-ci.org.key
3, by typing the following command to install the latest stable version of Jenkins
sudo dnf install jenkins
or https://pkg.jenkins.io/redhat-stable/ download 2.190.3-1.1.noarch.rpm-Jenkins
the sudo DNF-2.190.3-1.1.noarch.rpm the install Jenkins
. 4, Jenkins start service and enable it to start at system boot
the sudo systemctl start Jenkins
the sudo systemctl enable Jenkins
. 5, check whether Jenkins is running
systemctl status jenkins
6, use the following command to open the necessary ports
sudo Firewall-cmd = --permanent --zone public --add-Port = 8080 / tcp
sudo Firewall-cmd --reload
7, the browser HTTP: // ip: 8080
8, the cat command to view the server CentOS Jenkins on 8 administrator account password
sudo cat / var / lib / Jenkins / Secrets / initialAdminPassword
9, copy the password from the terminal, and paste it into the "administrator password" field and click "continue
10, click "Install recommended plug-in" box, the installation process will begin
11、
On CentOS system successfully installed Jenkins