CI / CD has been very popular lately and Jenkins is just one of the CI tools. There are two ways to install Jenkins, one is to download the .war file directory, another way is to install through yum. In this post, I will use the later way.
Install jenkins’s repository file follow by install jenkins and java.
1 2 3 wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat-stable/jenkins.repo rpm --import https://jenkins-ci.org/redhat/jenkins-ci.org.key yum install jenkins java
Start Jenkins service.
1 2 systemctl start jenkins systemctl status jenkins
Jenkins use 8080 port by default, we can double check by using
1 ss -tpln
You need to make sure port 8080 is accessible. For simplicity, I will stop firewalld for now. For more information about firewalld, please refer: CentOS7 firewall-cmd Cheat Sheet
1 systemctl stop firewalld
Now use browser to open Jenkins. Type in
As suggested, admin password can be found at
1 cat /var/lib/jenkins/secrets/initialAdminPassword
After passwd is enter, now we start to install plugins.
After plugins installation, we can decide to create a new user or continue as admin. For simplicity, I will continue as admin.
Last step is to save the configuration.
Once clicked on start using jenkins, you are in Jenkins!