Linux serverNETWORK ADMINISTRATIONS

Install and Configure Jenkins on CentOS 8

In this Video, We are going to perform How to Install Jenkins on CentOS 8/RHEL 8 or any other cloud platform like Amazon EC2, Azure VM, Google Cloud Compute,etc. with preinstalled CentOS 8/RHEL 8.

You can follow below our article to install Jenkins on CentOS 8

How to Install Jenkins on CentOS 8/RHEL 8

 Prerequisites
CentOS 8 with Minimal Installation
Atleast 1 GB RAM
JDK 1.8 or Higher verison is supported
Open Port 8080

Install JDK on Ubuntu
Please follow below article to download and install Oracle JAVA 11 on CentOS 8 Manually

How to Download and Install Oracle JAVA 11 on CentOS 8

OR

You can install Open JDK 11

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

Verify Java Version

To check the java version:

java -version

Step 1: Download and Add Jenkins GPG Key

Download and Add Jenkins LTS repo in /etc/yum.repos.d/jenkins.repo location

sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat-stable/jenkins.repo

Import Jenkins GPG Key
sudo rpm –import https://jenkins-ci.org/redhat/jenkins-ci.org.key

Step 2: Install Jenkins On CentOS 8/RHEL 8

Once key and repository added , update the system packages

sudo yum update

Now its time to Install Jenkins and its dependencies:

sudo yum install jenkins

Step 4: Start Jenkins Service

Once installation completed, start the Jenkins service

sudo systemctl start jenkins

Check the Jenkins Service

sudo systemctl status jenkins

Allow port 8080/tcp in Firewall to Access Jenkins from remotely

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

sudo firewall-cmd –reload

If you have installed Jenkins on Cloud Instance Allow the Port in Incoming or Network Security Group
How to check jenkins version command line in Linux

To check Jenkins version using command line in CentOS

grep version /var/lib/jenkins/config.xml

Step 5: Configure Jenkins

After installation of Jenkins ,successfully running Jenkins services and we will check on browser by Jenkins default port number 8080.

We can browse server IP address or domain

http://ip_address_or_domain_name:8080.

By hitting IP and Port on browser for the first time it will prompt for InitialAdminPassword. ssh server and type below command.

sudo cat /var/lib/jenkins/secrets/intialAdminPassword

After entering it will give some key as output. Copy and Paste in the browser and Click “Continue” .

In the above image we select “Install Suggested Plugins”, and progress bar will start.

When the Installation get successful it will prompt for another page “Create First Admin User”. On the below page enter username,password,Email.

In the above pic you can create new user and password or you can “Continue as admin“. After configuring everything you will prompt a new page.

Next it will ask to configure URL to access Jenkins and click on save and Finish button.

Now click on “Start using Jenkins”. It will redirect to Jenkins Dashboard:

Finally you can see Jenkins Dashboard

Related Articles

If you likes our video, please subscribe our channel on YouTube, like our page on FB and Follow on Twitter
You can connect us on facebook,Twitter and youtube

Facebook – https://www.facebook.com/FOSSTechNix
Twitter – https://twitter.com/ftechnix

Youtube – https://www.youtube.com/channel/UC9AL2A0O1oWQJsR

source

centos 8

Leave a Reply

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