Posts Install Jenkins on CentOS7
Post
Cancel

Install Jenkins on CentOS7

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

jenkins
jenkins
jenkins

Start Jenkins service.

1
2
systemctl start jenkins
systemctl status jenkins

jenkins

Jenkins use 8080 port by default, we can double check by using ss.

1
ss -tpln

jenkins

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

jenkins

Now use browser to open Jenkins. Type in yourserverip:8080 or yoururl:8080.
jenkins

As suggested, admin password can be found at /var/lib/jenkins/secrets/initialAdminPassword

1
cat /var/lib/jenkins/secrets/initialAdminPassword

jenkins

After passwd is enter, now we start to install plugins.
jenkins

Plugins installing.
jenkins

After plugins installation, we can decide to create a new user or continue as admin. For simplicity, I will continue as admin.
jenkins

Last step is to save the configuration.
jenkins
jenkins

Once clicked on start using jenkins, you are in Jenkins!
jenkins

This post is licensed under CC BY 4.0 by the author.