How to Install Jenkins on CentOS 7
Jenkins
Jenkins is a free and open-source continuous integration tool and its code is written in Java. It provides the feature of continuous build and deployment or in other words, we can say it is an automation server. Jenkins is used where continuous build and integration is going on for software development.
In this article, we are talking about the installation of Jenkins
Step 1: Add Jenkins Repository
Jenkins package is not available in the default CentOS and RHEL repositories. So we need to add the Jenkins repository using the beneath commands.
wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins.io/redhat-stable/jenkins.repo
rpm --import http://pkg.jenkins.io/redhat-stable/jenkins.io.key
Step 2: Install Jenkins and Java
Run the below yum command to install Jenkins and java.
yum install jenkins java-1.8.0-openjdk –y
Step 3: Start and Enable Jenkins Service
Run the following systemctl commands to start and enable the jenkins service
systemctl start jenkins
systemctl enable jenkins
Check the status of Jenkins.
systemctl status jenkins
In case a firewall is enabled on your Linux server then run the following commands to open Jenkins related ports like 80 and 8080.
firewall-cmd --zone=public --add-port=8080/tcp --permanent
firewall-cmd --zone=public --add-service=http --permanent
firewall-cmd --reload
Check whether Jenkins is working by visiting the following URL.
http://your-ip-address:8080
Step 4: Installation Process Of Jenkins
The admin password is created and stored in the log file /var/log/jenkins/jenkins.log. Run the below command to get the password.
grep -A 5 password /var/log/jenkins/jenkins.log
Copy the password and paste it in above windows and click on Continue.
In the next windows Select the option : Install suggested plugins
As we can see required plugin installation is in progress for Jenkins. Once it is done with plugin installation. It will ask to create Admin User or you can select the skip option.
Finally, we can click on Save and Finish. Then we can see the page of Jenkins installation completed.
Conclusion
We hope this article helped you learn how to install Jenkins. Jenkins is a main tool of DevOps. It helps automate the parts of software development related to building, testing, and deploying, facilitating continuous integration and continuous delivery. Are you looking for cheap web hosting service providers? Then this is your last destination to end your search. We at TheStack provide premium wordpress hosting, hybrid smart server hosting, SEO dedicated server hosting and managed virtual private servers at best price. So, what are you waiting for? Get in touch with us to know more.