How to Install Jenkins on CentOS 7

Jenkins is an open-source automation server that enables developers to build, test, and deploy their software. This article covers the step by step detailed installation of Jenkins on CentOS 7.

Installing Java

Jenkins requires Java to run. Install Java with:

sudo yum install java-1.8.0-openjdk-devel -y

Adding Jenkins Repository

Add the Jenkins repository to your system:

sudo wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo
sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key

Installing Jenkins

Now, install Jenkins:

sudo yum install jenkins -y

Starting and Enabling Jenkins

Enable and start the Jenkins service:

sudo systemctl start jenkins
sudo systemctl enable jenkins

Configuring Firewall

If your server is protected by a firewall, open the Jenkins port (default: 8080):

sudo firewall-cmd --permanent --zone=public --add-port=8080/tcp
sudo firewall-cmd --reload

Accessing Jenkins

Access Jenkins by navigating to `http://your_server_ip_or_domain:8080` in your web browser. You’ll be prompted to enter the initial admin password, found in:

sudo cat /var/lib/jenkins/secrets/initialAdminPassword

Setting Up Jenkins

Follow the instructions on screen to complete the Jenkins setup, including installing suggested plugins and creating an admin user.

Jenkins is now installed and running on your CentOS 7 server. You can begin using Jenkins to automate your development and deployment processes.

About the author

Technical Sahil

Sahil Dhamija is a visionary entrepreneur and tech enthusiast, proudly owning multiple companies across India, the US, the UK, and the UAE. As the founder of AInventions Technologies LLC, DigitalMarkethink Solutions LLC, WebReinvent Technologies LLC, BusinessMate Software Solutions LLC, and co-founder of Hostyaga FZE LLC, Sahil is a dynamic leader shaping the future of technology and digital marketing.

Apart from leading his businesses, Sahil is a passionate tech YouTuber, sharing insights and tutorials on various technological topics. He also serves as the CTO at Vayuna Corporate Travels Pvt Ltd and as Product Head at Vayuna Voicetech Pvt Ltd, where he oversees cutting-edge solutions in corporate travel and voice technology. Additionally, Sahil is a creative force in the film industry, producing films through Gentle Breeze Films Pvt Ltd.

Driven by innovation and creativity, Sahil continues to push boundaries in technology, media, and business.

View all posts

Leave a Reply

Your email address will not be published. Required fields are marked *