• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

UnixArena

  • Home
  • kubernetes
  • DevOps
    • Terraform
    • Jenkins
    • Docker
    • Openshift
      • OKD
    • Ansible engine
    • Ansible Tower
      • AWX
    • Puppet
  • Cloud
    • Azure
    • AWS
    • Openstack
    • Docker
  • VMware
    • vCloud Director
    • VMware-Guests
    • Vcenter Appliance 5.5
    • vC OPS
    • VMware SDDC
    • VMware vSphere 5.x
      • vSphere Network
      • vSphere DS
      • vShield Suite
    • VMware vSphere 6.0
    • VSAN
    • VMware Free Tools
  • Backup
    • Vembu BDR
    • Veeam
    • Nakivo
    • Azure Backup
    • Altaro VMBackup
    • Spinbackup
  • Tutorials
    • Openstack Tutorial
    • Openstack Beginner’s Guide
    • VXVM-Training
    • ZFS-Tutorials
    • NetApp cDot
    • LVM
    • Cisco UCS
    • LDOM
    • Oracle VM for x86
  • Linux
    • How to Articles
    • Q&A
    • Networking
    • RHEL7
  • DevOps Instructor-led Training
  • Contact

How to Install and Configure Jenkins on Redhat/ CentOS 7?

March 25, 2019 By Cloud_Devops 4 Comments

Installing and configuring Jenkins on Redhat Linux / CentOS is very straight forward. Jenkins is a very famous tool among developers.  Jenkins is an open source automation platform written in Java. The creator of Jenkins is Kohsuke Kawaguchi and it has been developed when he was working at Sun Microsystems. Jenkins supports most of the major operating systems. Here is the list of supported operating system.

  • Arch Linux
  • FreeBSD
  • Mac OS X
  • OpenBSD
  • openSUSE
  • Red Hat/Fedora/CentOS
  • Ubuntu/Debian
  • Windows

This article will walk through the deployment of Jenkins on Redhat Enterprise Linux 7 / CentOS 7.

System Configuration:

  • Redhat Linux 7 / Cent OS 
  • Memory – 16GB
  • vCPU – 2
  • Hard disk – 50GB
  • Network – Access to the internet 
  • Access to EPEL/Redhat Repositories or Local DVD Repositories. 

 

1. Login to Rehat Linux 7/ Centos 7 VM as root user.

2. Ensure firewalld is disabled to avoid connection issue.

3. Disable the SELinux. (Refer this article to disable SELinux)

4. Install Open JDK from yum repository.

~]# yum install java-1.8.0-openjdk-devel
Loaded plugins: product-id, search-disabled-repos, subscription-manager
Resolving Dependencies
---> Package libfontenc.x86_64 0:1.1.3-3.el7 will be installed
--> Finished Dependency Resolution
Install  1 Package  (+16 Dependent packages)
Upgrade             (  7 Dependent packages)

Total download size: 45 M
Is this ok [y/d/N]: y

 

5. Pull the Jenkins Repo file.

~]# curl --silent --location http://pkg.jenkins-ci.org/redhat-stable/jenkins.repo | sudo tee /etc/yum.repos.d/jenkins.repo
[jenkins]
name=Jenkins-stable
baseurl=http://pkg.jenkins.io/redhat-stable
gpgcheck=1
#

6. Install Jenkins using the following command.

~]# yum install jenkins
Loaded plugins: product-id, search-disabled-repos, subscription-manager
jenkins                                                                                                 | 2.9 kB  00:00:00
jenkins/primary_db                                                                                      |  28 kB  00:00:00
Resolving Dependencies
--> Running transaction check
---> Package jenkins.noarch 0:2.150.3-1.1 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=======================================================================================
 Package          Arch            Version               Repository              Size
========================================================================================
Installing:
 jenkins         noarch          2.150.3-1.1            jenkins                  72 M

Transaction Summary
======================================================================================
Install  1 Package

Total download size: 72 M
Installed size: 72 M
Is this ok [y/d/N]: y
Downloading packages:
jenkins-2.150.3-1.1.noarch.rpm                                                                          |  72 MB  00:01:41
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : jenkins-2.150.3-1.1.noarch                                                                                  1/1
  Verifying  : jenkins-2.150.3-1.1.noarch                                                                                  1/1

Installed:
  jenkins.noarch 0:2.150.3-1.1

Complete!
#

7. Start the Jenkins service using systemctl.

# systemctl start jenkins

8. Check the Jenkins service status. It should be up & running.

# systemctl status jenkins.service
● jenkins.service - LSB: Jenkins Automation Server
   Loaded: loaded (/etc/rc.d/init.d/jenkins; bad; vendor preset: disabled)
   Active: active (running) since Mon 2019-03-11 14:13:49 EDT; 8s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 19095 ExecStart=/etc/rc.d/init.d/jenkins start (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/jenkins.service
           └─19115 /etc/alternatives/java -Dcom.sun.akuma.Daemon=daemonized -Djava.awt.headless=true -DJENKINS_HOME=/var/lib...

Mar 11 14:13:48 UnixArena-Jenkins systemd[1]: Starting LSB: Jenkins Automation Server...
Mar 11 14:13:48 UnixArena-Jenkins runuser[19096]: pam_unix(runuser:session): unrecognized ENCRYPT_METHOD value [DES]
Mar 11 14:13:48 UnixArena-Jenkins runuser[19096]: pam_unix(runuser:session): session opened for user jenkins by...d=0)
Mar 11 14:13:49 UnixArena-Jenkins runuser[19096]: pam_unix(runuser:session): unrecognized ENCRYPT_METHOD value [DES]
Mar 11 14:13:49 UnixArena-Jenkins jenkins[19095]: Starting Jenkins [  OK  ]
Mar 11 14:13:49 UnixArena-Jenkins systemd[1]: Started LSB: Jenkins Automation Server.
Hint: Some lines were ellipsized, use -l to show in full.

9. It’s time to access the Jenkins portal from the browser. (Assuming that there is no firewall between your desktop & Jenkins host). Just view the given file location to know the administrator password.

Jenkins - Initial Page
Jenkins – Initial Page

 

10. Go with the recommended plugin. Select “Install Suggested Plugins” to continue.

Customize Jenkins - Installing basic plugins
Customize Jenkins – Installing basic plugins

 

11. Jenkins installs the suggested plugins.

Initializing with basic Plugins
Initializing with basic Plugins

 

12. Create a first admin user for Jenkins.

Create First Jenkins Admin user
Create First Jenkins Admin user

 

13. Here is the final configuration page for Jenkins to commit the changes.

Instance Configuration - jenkins - Final
Instance Configuration – jenkins – Final

 

Welcome to Jenkins.

Jenkins Home Page
Jenkins Home Page

 

We have successfully deployed Jenkins on RHEL 7 / CentOS 7. In upcoming articles, we will explore more about Jenkins plugins and more use case on the enterprise infrastructure side.

 

Share it! Comment it !! Be Sociable !!!

Filed Under: Ansible engine, CentOS, Configuration Management, DevOps Tagged With: CentOS, DevOps, Jenkins, RHEL7

Reader Interactions

Comments

  1. Alex says

    October 17, 2020 at 12:29 am

    You should run this if you get an error with the key

    rpm –import https://pkg.jenkins.io/redhat/jenkins.io.key

    Thanks,
    Alex.

    Reply
  2. Dnyaneshwar says

    February 18, 2020 at 4:55 pm

    Please import the public key before installing jenkins rpm.

    rpm –import https://pkg.jenkins.io/redhat-stable/jenkins.io.key

    Reply

Leave a Reply Cancel reply

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

Primary Sidebar

Follow UnixArena

  • Facebook
  • LinkedIn
  • Twitter

Copyright © 2025 · UnixArena ·

Go to mobile version