Installing Jenkins on CentOS 8 requires a root account or an account with sudo privileges. Because Jenkins is written in Java, you need to install a Java environment
1、 Install OpenJDK. sudo dnf install java-1.8.0-openjdk-devel
2、 Enable the 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、 Install the latest stable version of Jenkins by typing the following command sudo dnf install jenkins or https://pkg.jenkins.io/redhat-stable/ download jenkins-2.190.3-1.1.noarch.rpm sudo dnf install jenkins-2.190.3 -1.1.noarch.rpm
4、 Start the Jenkins service and enable it to start when the system boots sudo systemctl start jenkins sudo systemctl enable jenkins
5、 Check if 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、 Browser http://ip: 8080
8、 The cat command to view the Jenkins administrator account password on the server CentOS 8 sudo cat /var/lib/jenkins/secrets/initialAdminPassword
9、 Copy the password from the terminal, paste it into the "Administrator Password" field, and click "Continue
10、 Click the "Install suggested plugins" box and the installation process will begin
11、
Jenkins is successfully installed on CentOS system
Recommended Posts