• Categories
    Category
  • Categories
    Category
  • News
  • Tutorials
  • Forums
  • Tags
  • Users
Tutorial Comments FAQ Related Articles

How to install Jenkins in Linux

434

Installation of Jenkins in Linux

Jenkins is an open source Java-based program with the packages for Windows, Mac OS X and other Linux operating systems. It runs in servlet Container(Tomcat, Glass fish) and is supported by more than 400 plugins. Installation of Jenkins is explained in this tutorial.

Run the command and check the version of java available in the system.

[root@linuxhelp1 ~]# java -version
java version " 1.7.0_51" 
OpenJDK Runtime Environment (rhel-2.4.5.5.el7-x86_64 u51-b31)
OpenJDK 64-Bit Server VM (build 24.51-b03, mixed mode)

To Install Jenkins

Enable the Jenkins repository

[root@linuxhelp1 ~]# wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.repo
--2016-07-06 04:37:47--  http://pkg.jenkins-ci.org/redhat/jenkins.repo
Resolving pkg.jenkins-ci.org (pkg.jenkins-ci.org)... 52.202.51.185
Connecting to pkg.jenkins-ci.org (pkg.jenkins-ci.org)|52.202.51.185|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 71
Saving to: ‘ /etc/yum.repos.d/jenkins.repo’ 

100%[===========================================================================================> ] 71          --.-K/s   in 0s      

2016-07-06 04:37:48 (10.8 MB/s) - ‘ /etc/yum.repos.d/jenkins.repo’  saved [71/71]

Use the following command to download the key.

[root@linuxhelp1 ~]# rpm --import https://jenkins-ci.org/redhat/jenkins-ci.org.key

Install the Jenkins by using the following command.

[root@linuxhelp1 ~]# yum install jenkins -y
Loaded plugins: fastestmirror, langpacks
Determining fastest mirrors
 * base: centos.webwerks.com
 * extras: download.nus.edu.sg
 * updates: centos.webwerks.com
Resolving Dependencies
-->  Running transaction check
--->  Package jenkins.noarch 0:2.11-1.1 will be installed
.
.
.
Installed:
  jenkins.noarch 0:2.11-1.1                                                                                                          

Complete!

Once the installation of Jenkins completed add the Jenkins port to the Firewall as shown below.

[root@linuxhelp1 ~]# firewall-cmd --zone=public --add-port=8080/tcp --permanent
success
[root@linuxhelp1 ~]# firewall-cmd --zone=public --add-service=http --permanent
success
[root@linuxhelp1 ~]# firewall-cmd --reload
success
[root@linuxhelp1 ~]# firewall-cmd --list-all
public (default, active)
  interfaces: eno16777736
  sources:
  services: dhcpv6-client http ssh
  ports: 8080/tcp
  masquerade: no
  forward-ports:
  icmp-blocks:
  rich rules:

Start and check the status of the jenkins

[root@linuxhelp1 ~]# systemctl start jenkins
[root@linuxhelp1 ~]# systemctl status jenkins
jenkins.service - LSB: Jenkins Continuous Integration Server
   Loaded: loaded (/etc/rc.d/init.d/jenkins)
   Active: active (running) since Wed 2016-07-06 04:44:45 IST  19s ago
  Process: 43687 ExecStart=/etc/rc.d/init.d/jenkins start (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/jenkins.service
           ??43702 java -Dcom.sun.akuma.Daemon=daemonized -Djava.awt.headless=true -DJENKINS_HOME=/var/lib/jenkins -jar /usr/lib/j...

Jul 06 04:44:43 linuxhelp1 runuser[43688]: pam_unix(runuser:session): session opened for user jenkins by (uid=0)
Jul 06 04:44:45 linuxhelp1 jenkins[43687]: Starting Jenkins [  OK  ]
Jul 06 04:44:45 linuxhelp1 systemd[1]: Started LSB: Jenkins Continuous Integration Server.

Open the browser and type http://< IP_address> :8080 or http://localhost:8080
Installation-Jenkins-Java-based-program-Open-browser
Copy the path " /var/lib/jenkins/secrets/initialAdminpassword" in the home page and paste it in the terminal using your favourite editor to get the password.

[root@linuxhelp1 ~]# vim /var/lib/jenkins/secrets/initialAdminPassword
Bf30da956e2145178b84e950d3572608

Paste the password in the box. In setup wizard and choose “ install suggested plugins" .
Installation-Jenkins-Java-based-program-install-suggested-plugins
Setup installation starts.
Installation-Jenkins-Java-based-program-Setup-installation
Create admin user by entering the user details and click " Save and Finish"
Installation-Jenkins-Java-based-program-Create-admin-user

Click Start using Jenkins to explore Jenkins.

Installation-Jenkins-Java-based-program-explore-Jenkins
The dashboard of Jenkins appears.
Installation-Jenkins-Java-based-program-dashboard

Manage Jenkin option is used to configure system, configure global security, Global tool configuration, manage plugins etc
Installation-Jenkins-Java-based-program-Manage-Jenkin-configure
Select Configure Global Security to Enable Security and click Save to apply changes.
Installation-Jenkins-Java-based-program-Configure-Global-Security
For managing plugin click on Manage plugin option.
Installation-Jenkins-Java-based-program-Manage-plugin

Tags:
oliver
Author: 

Comments ( 0 )

No comments available

Add a comment

Frequently asked questions ( 5 )

Q

What is the difference between Maven, Ant and Jenkins?

A

Maven and Ant are Build Technologies whereas Jenkins is a continuous integration tool.

Q

Which SCM tools Jenkins supports?

A

Below are Source code management tools supported by Jenkins:

AccuRev
CVS,
Subversion,
Git,
Mercurial,
Perforce,
Clearcase
RTC

Q

How to move or copy Jenkins from one server to another?

A

I will approach this task by copying the jobs directory from the old server to the new one. There are multiple ways to do that, I have mentioned it below:

You can:

Move a job from one installation of Jenkins to another by simply copying the corresponding job directory.
Make a copy of an existing job by making a clone of a job directory by a different name.
Rename an existing job by renaming a directory. Note that if you change a job name you will need to change any other job that tries to call the renamed job.

Q

what are the commands to start Jenkins manually?

A

For this answer I will suggest you to go with the below mentioned flow:



To start Jenkins manually open Console/Command line, then go to your Jenkins installation directory. Over there you can use the below commands:



To start Jenkins: jenkins.exe start

To stop Jenkins: jenkins.exe stop

To restart Jenkins: jenkins.exe restart

Q

What is continuous integration in Jenkins?

A

In software development, multiple developers or teams work on different segments of same web application so you have to perform integration test by integrating all modules. In order to do that an automated process for each piece of code is performed on daily bases so that all your codes get tested. This process is known as continuous integration.

Related Tutorials in How to install Jenkins in Linux

Related Tutorials in How to install Jenkins in Linux

How to install SoapUI in Ubuntu 16.04
How to install SoapUI in Ubuntu 16.04
Feb 28, 2017
How to install aptana studio 3 in Ubuntu
How to install aptana studio 3 in Ubuntu
Jul 12, 2016
How to Install Alfresco Community Edition in Ubuntu
How to Install Alfresco Community Edition in Ubuntu
Nov 22, 2016
How To Install Angry IP Scanner in CentOS
How To Install Angry IP Scanner in CentOS
Nov 2, 2016
Installation of JAVA 8 ( JDK 8u45) on Linux Systems
Installation of JAVA 8 ( JDK 8u45) on Linux Systems
Mar 29, 2016
How to configure Apache plugins in Nagios Server
How to configure Apache plugins in Nagios Server
May 25, 2017
How to install RubyMine in Ubuntu
How to install RubyMine in Ubuntu
Jul 20, 2016
How to Setup GlassFish in Ubuntu
How to Setup GlassFish in Ubuntu
Oct 5, 2016

Related Forums in How to install Jenkins in Linux

Related Forums in How to install Jenkins in Linux

Apache tomcat
AadrikaAnshu class=
Cannot find ./catalina.sh The file is absent or does not have execute permission This file is needed to run this program
Jun 17, 2019
Apache tomcat
alexander class=
how to configure two apache instances in CentOS
Apr 25, 2017
Apache tomcat
AadrikaAnshu class=
BASH: ./startup.sh: Permission denied On CentOS 7.6
Jun 17, 2019
Kali Linux
sachin179 class=
How to recover centos6 harddisk if its size is showing 0KB
Apr 25, 2018
Apache tomcat
elijah class=
installation for tomcat and httpd is same or not
May 6, 2017
Apache
andrew class=
adding apache plugin in nagios
May 23, 2017
Apache tomcat
benjamin class=
two apache in one machine
Apr 7, 2017

Related News in How to install Jenkins in Linux

Related News in How to install Jenkins in Linux

Fake plugin infects 4,000 WordPress sites.
Fake plugin infects 4,000 WordPress sites.
Apr 5, 2017
Red Hat the New Steward of OpenJDK 8 and OpenJDK 11
Red Hat the New Steward of OpenJDK 8 and OpenJDK 11
Apr 25, 2019
Back To Top!
Rank
User
Points

Top Contributers

userNamenaveelansari
135850

Top Contributers

userNameayanbhatti
92510

Top Contributers

userNamehamzaahmed
32150

Top Contributers

1
userNamelinuxhelp
31040

Top Contributers

userNamemuhammadali
24500
Can you help Ryan ?
how to use visual traceroute tool

Am using traceroute command to check for the route. i got this tool while surfing. So pls help me out installation and usage of Visual traceroute tool.

Networking
  • Routing
  • trunk
  • Netmask
  • Packet Capture
  • domain
  • HTTP Proxy
Server Setup
  • NFS
  • KVM
  • Memory
  • Sendmail
  • WebDAV
  • LXC
Shell Commands
  • Cloud commander
  • Command line archive tools
  • last command
  • Shell
  • terminal
  • Throttle
Desktop Application
  • Linux app
  • Pithos
  • Retrospect
  • Scribe
  • TortoiseHg
  • 4Images
Monitoring Tool
  • Monit
  • Apache Server Monitoring
  • EtherApe 
  • Arpwatch Tool
  • Auditd
  • Barman
Web Application
  • Nutch
  • Amazon VPC
  • FarmWarDeployer
  • Rukovoditel
  • Mirror site
  • Chef
Contact Us | Terms of Use| Privacy Policy| Disclaimer
© 2025 LinuxHelp.com All rights reserved. Linux™ is the registered trademark of Linus Torvalds. This site is not affiliated with linus torvalds in any way.