To install Jenkins on CentOS 8, you need to use a root account or an account with sudo permission. Because Jenkins is written in Java, the Java environment needs to be installed
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 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 at system boot time
sudo systemctl start jenkins sudo systemctl enable jenkins
5. Check that 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 checks the administrator account and password of Jenkins 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 then click continue
10. Click the install recommended plug-ins box and the installation process begins
Jenkins was successfully installed on CentOS
The above is how to install Jenkins on CentOS 8. I hope it will help you. If you have any questions, please leave me a message, and I will reply you in time. Thank you very much for your support to the developeppaer website!
If you think this article is helpful to you, welcome to reprint, please indicate the source, thank you!