Jenkins Installation and Configuration Steps on RHEL 7/Centos 7

 Jenkins  is a self-contained , free, opensource and most popular continuous Integration (CI) tool written in JAVA . It is used to automate all sorts of tasks related to testing, building and deploying the source code. Jenkins Installation on RHEL 7 Steps.

Jenkins supports all version control system , including Subversion,Git, RTC, CVS, Mercurial.

Also execute Apache maven and acapche ant based projects as well as scheduling by corn-jobs and windows batch commands.

Jenkins is security depends on the below factors

  1. Access control  – It can be customized of user authentication and authorization.
  2. External threats – Such as malicious builds and CSRF(Cross-site request forgery ) attacks is supported.

Features Of Jenkins

  1. It is easy to installation and configuration.
  2. It is simple, user-friendly opensource tool.
  3. Rich plugin Eco system.
  4. Extensible.
  5. Distributed builds.

Jenkins Installation and Configuration

We can install Jenkins two ways on RHEL/Centos through a repo or repositroy and the WAR file.

Before going to install and configure the Jenkins first need to setup JAVA on server.

[root@lab ~]# yum -y install java-1.8.0-openjdk wget
Total download size: 32 M
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
(1/3): wget-1.14-15.el7.x86_64.rpm | 547 kB 00:00
(2/3): java-1.8.0-openjdk-1.8.0.144-0.b01.el7_4.x86_64.rpm | 238 kB 00:00
(3/3): java-1.8.0-openjdk-headless-1.8.0.144-0.b01.el7_4.x | 32 MB 00:01
--------------------------------------------------------------------------------
Complete!

To check java version

[root@lab ~]# java -version
openjdk version "1.8.0_144"

By default Jenkins package is not available on the RHEL/Centos repositories. So that need to add and import the jenkins repository on machine by using below commands.

[root@lab ~]# cd /etc/yum.repos.d/
[root@lab yum.repos.d]# wget https://pkg.jenkins.io/redhat-stable/jenkins.repo
[root@lab yum.repos.d]# rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key

Now install and Configure the Jenkins

[root@lab ~]# yum -y install jenkins
Installed:
jenkins.noarch 0:2.60.3-1.1
Complete!

Start and enable the Jenkins service by using below commands

[root@lab ~]# systemctl start jenkins
[root@lab ~]# systemctl enable jenkins

Jenkins runs on port 8080, Enable/Allow port 8080 from firewall by following below commands

[root@lab ~]# firewall-cmd --zone=public --add-port=8080/tcp --permanent
success
(OR)
[root@lab ~]# firewall-cmd --zone=public --add-service=http --permanent
success
[root@lab ~]# firewall-cmd --reload

Go to web browser and type “http://<ip address>:8080” .

Follow the below screenshots.

 

Jenkins First time Installation Screen

Jenkins First time Installation Screen

 

The Admin password  is created and stored in the below file.

[root@lab ~]# cat /var/lib/jenkins/secrets/initialAdminPassword
(OR)
[root@lab ~]# grep -A 5 passwd /var/log/jenkins/jenkins.log

Copy the password and insert , click on continue button.  Select the option “Install suggested plugins”.

 

Install Jenkins Plugins

Install Jenkins Plugins

 

Getting Started with jenkins

Getting Started with jenkins

 

After done with plugin installation it will ask to create Admin user.

Getting Started

Getting Started

 

Create jenkins Admin User

Create jenkins Admin User

 

Click on “Save and Finish” button.

Jenkins Ready to Use

Jenkins Ready to Use

 

Start using Jenkins. Jenkins Installation And Configuration on RHEL 7/Centos 7.

Documentation Official Site

Related Articles

HowTo Install R Shiny Server

Linux Tutorial

HowTo Install ShinySky Packages

Thanks for your wonderful Support and Encouragement

ARK

My Name is ARK. Expert in grasping any new technology, Interested in Sharing the knowledge. Learn more & Earn More

You may also like...

3 Responses

  1. ajai says:

    Hi, may be this is very silly question but the first command is not working in my environment. Do i need to set any EPEL repo.
    [root@lab ~]# yum -y install java-1.8.0-openjdk wget

  2. Roger says:

    Question: if Jenkins runs on port 8080, why are you opening port 80 on the firewall too?

Leave a Reply