Explore Courses
course iconScrum AllianceCertified ScrumMaster (CSM) Certification
  • 16 Hours
Best seller
course iconScrum AllianceCertified Scrum Product Owner (CSPO) Certification
  • 16 Hours
Best seller
course iconScaled AgileLeading SAFe 6.0 Certification
  • 16 Hours
Trending
course iconScrum.orgProfessional Scrum Master (PSM) Certification
  • 16 Hours
course iconScaled AgileSAFe 6.0 Scrum Master (SSM) Certification
  • 16 Hours
course iconScaled Agile, Inc.Implementing SAFe 6.0 (SPC) Certification
  • 32 Hours
Recommended
course iconScaled Agile, Inc.SAFe 6.0 Release Train Engineer (RTE) Certification
  • 24 Hours
course iconScaled Agile, Inc.SAFe® 6.0 Product Owner/Product Manager (POPM)
  • 16 Hours
Trending
course iconKanban UniversityKMP I: Kanban System Design Course
  • 16 Hours
course iconIC AgileICP Agile Certified Coaching (ICP-ACC)
  • 24 Hours
course iconScrum.orgProfessional Scrum Product Owner I (PSPO I) Training
  • 16 Hours
course iconAgile Management Master's Program
  • 32 Hours
Trending
course iconAgile Excellence Master's Program
  • 32 Hours
Agile and ScrumScrum MasterProduct OwnerSAFe AgilistAgile CoachFull Stack Developer BootcampData Science BootcampCloud Masters BootcampReactNode JsKubernetesCertified Ethical HackingAWS Solutions Artchitct AssociateAzure Data Engineercourse iconPMIProject Management Professional (PMP) Certification
  • 36 Hours
Best seller
course iconAxelosPRINCE2 Foundation & Practitioner Certificationn
  • 32 Hours
course iconAxelosPRINCE2 Foundation Certification
  • 16 Hours
course iconAxelosPRINCE2 Practitioner Certification
  • 16 Hours
Change ManagementProject Management TechniquesCertified Associate in Project Management (CAPM) CertificationOracle Primavera P6 CertificationMicrosoft Projectcourse iconJob OrientedProject Management Master's Program
  • 45 Hours
Trending
course iconProject Management Master's Program
  • 45 Hours
Trending
PRINCE2 Practitioner CoursePRINCE2 Foundation CoursePMP® Exam PrepProject ManagerProgram Management ProfessionalPortfolio Management Professionalcourse iconAWSAWS Certified Solutions Architect - Associate
  • 32 Hours
Best seller
course iconAWSAWS Cloud Practitioner Certification
  • 32 Hours
course iconAWSAWS DevOps Certification
  • 24 Hours
course iconMicrosoftAzure Fundamentals Certification
  • 16 Hours
course iconMicrosoftAzure Administrator Certification
  • 24 Hours
Best seller
course iconMicrosoftAzure Data Engineer Certification
  • 45 Hours
Recommended
course iconMicrosoftAzure Solution Architect Certification
  • 32 Hours
course iconMicrosoftAzure Devops Certification
  • 40 Hours
course iconAWSSystems Operations on AWS Certification Training
  • 24 Hours
course iconAWSArchitecting on AWS
  • 32 Hours
course iconAWSDeveloping on AWS
  • 24 Hours
course iconJob OrientedAWS Cloud Architect Masters Program
  • 48 Hours
New
course iconCareer KickstarterCloud Engineer Bootcamp
  • 100 Hours
Trending
Cloud EngineerCloud ArchitectAWS Certified Developer Associate - Complete GuideAWS Certified DevOps EngineerAWS Certified Solutions Architect AssociateMicrosoft Certified Azure Data Engineer AssociateMicrosoft Azure Administrator (AZ-104) CourseAWS Certified SysOps Administrator AssociateMicrosoft Certified Azure Developer AssociateAWS Certified Cloud Practitionercourse iconAxelosITIL 4 Foundation Certification
  • 16 Hours
Best seller
course iconAxelosITIL Practitioner Certification
  • 16 Hours
course iconPeopleCertISO 14001 Foundation Certification
  • 16 Hours
course iconPeopleCertISO 20000 Certification
  • 16 Hours
course iconPeopleCertISO 27000 Foundation Certification
  • 24 Hours
course iconAxelosITIL 4 Specialist: Create, Deliver and Support Training
  • 24 Hours
course iconAxelosITIL 4 Specialist: Drive Stakeholder Value Training
  • 24 Hours
course iconAxelosITIL 4 Strategist Direct, Plan and Improve Training
  • 16 Hours
ITIL 4 Specialist: Create, Deliver and Support ExamITIL 4 Specialist: Drive Stakeholder Value (DSV) CourseITIL 4 Strategist: Direct, Plan, and ImproveITIL 4 Foundationcourse iconJob OrientedData Science Bootcamp
  • 6 Months
Trending
course iconJob OrientedData Engineer Bootcamp
  • 289 Hours
course iconJob OrientedData Analyst Bootcamp
  • 6 Months
course iconJob OrientedAI Engineer Bootcamp
  • 288 Hours
New
Data Science with PythonMachine Learning with PythonData Science with RMachine Learning with RPython for Data ScienceDeep Learning Certification TrainingNatural Language Processing (NLP)TensorflowSQL For Data Analyticscourse iconIIIT BangaloreExecutive PG Program in Data Science from IIIT-Bangalore
  • 12 Months
course iconMaryland UniversityExecutive PG Program in DS & ML
  • 12 Months
course iconMaryland UniversityCertificate Program in DS and BA
  • 31 Weeks
course iconIIIT BangaloreAdvanced Certificate Program in Data Science
  • 8+ Months
course iconLiverpool John Moores UniversityMaster of Science in ML and AI
  • 750+ Hours
course iconIIIT BangaloreExecutive PGP in ML and AI
  • 600+ Hours
Data ScientistData AnalystData EngineerAI EngineerData Analysis Using ExcelDeep Learning with Keras and TensorFlowDeployment of Machine Learning ModelsFundamentals of Reinforcement LearningIntroduction to Cutting-Edge AI with TransformersMachine Learning with PythonMaster Python: Advance Data Analysis with PythonMaths and Stats FoundationNatural Language Processing (NLP) with PythonPython for Data ScienceSQL for Data Analytics CoursesAI Advanced: Computer Vision for AI ProfessionalsMaster Applied Machine LearningMaster Time Series Forecasting Using Pythoncourse iconDevOps InstituteDevOps Foundation Certification
  • 16 Hours
Best seller
course iconCNCFCertified Kubernetes Administrator
  • 32 Hours
New
course iconDevops InstituteDevops Leader
  • 16 Hours
KubernetesDocker with KubernetesDockerJenkinsOpenstackAnsibleChefPuppetDevOps EngineerDevOps ExpertCI/CD with Jenkins XDevOps Using JenkinsCI-CD and DevOpsDocker & KubernetesDevOps Fundamentals Crash CourseMicrosoft Certified DevOps Engineer ExperteAnsible for Beginners: The Complete Crash CourseContainer Orchestration Using KubernetesContainerization Using DockerMaster Infrastructure Provisioning with Terraformcourse iconTableau Certification
  • 24 Hours
Recommended
course iconData Visualisation with Tableau Certification
  • 24 Hours
course iconMicrosoftMicrosoft Power BI Certification
  • 24 Hours
Best seller
course iconTIBCO Spotfire Training
  • 36 Hours
course iconData Visualization with QlikView Certification
  • 30 Hours
course iconSisense BI Certification
  • 16 Hours
Data Visualization Using Tableau TrainingData Analysis Using Excelcourse iconEC-CouncilCertified Ethical Hacker (CEH v12) Certification
  • 40 Hours
course iconISACACertified Information Systems Auditor (CISA) Certification
  • 22 Hours
course iconISACACertified Information Security Manager (CISM) Certification
  • 40 Hours
course icon(ISC)²Certified Information Systems Security Professional (CISSP)
  • 40 Hours
course icon(ISC)²Certified Cloud Security Professional (CCSP) Certification
  • 40 Hours
course iconCertified Information Privacy Professional - Europe (CIPP-E) Certification
  • 16 Hours
course iconISACACOBIT5 Foundation
  • 16 Hours
course iconPayment Card Industry Security Standards (PCI-DSS) Certification
  • 16 Hours
course iconIntroduction to Forensic
  • 40 Hours
course iconPurdue UniversityCybersecurity Certificate Program
  • 8 Months
CISSPcourse iconCareer KickstarterFull-Stack Developer Bootcamp
  • 6 Months
Best seller
course iconJob OrientedUI/UX Design Bootcamp
  • 3 Months
Best seller
course iconEnterprise RecommendedJava Full Stack Developer Bootcamp
  • 6 Months
course iconCareer KickstarterFront-End Development Bootcamp
  • 490+ Hours
course iconCareer AcceleratorBackend Development Bootcamp (Node JS)
  • 4 Months
ReactNode JSAngularJavascriptPHP and MySQLcourse iconPurdue UniversityCloud Back-End Development Certificate Program
  • 8 Months
course iconPurdue UniversityFull Stack Development Certificate Program
  • 9 Months
course iconIIIT BangaloreExecutive Post Graduate Program in Software Development - Specialisation in FSD
  • 13 Months
Angular TrainingBasics of Spring Core and MVCFront-End Development BootcampReact JS TrainingSpring Boot and Spring CloudMongoDB Developer Coursecourse iconBlockchain Professional Certification
  • 40 Hours
course iconBlockchain Solutions Architect Certification
  • 32 Hours
course iconBlockchain Security Engineer Certification
  • 32 Hours
course iconBlockchain Quality Engineer Certification
  • 24 Hours
course iconBlockchain 101 Certification
  • 5+ Hours
NFT Essentials 101: A Beginner's GuideIntroduction to DeFiPython CertificationAdvanced Python CourseR Programming LanguageAdvanced R CourseJavaJava Deep DiveScalaAdvanced ScalaC# TrainingMicrosoft .Net Frameworkcourse iconSalary Hike GuaranteedSoftware Engineer Interview Prep
  • 3 Months
Data Structures and Algorithms with JavaScriptData Structures and Algorithms with Java: The Practical GuideLinux Essentials for Developers: The Complete MasterclassMaster Git and GitHubMaster Java Programming LanguageProgramming Essentials for BeginnersComplete Python Programming CourseSoftware Engineering Fundamentals and Lifecycle (SEFLC) CourseTest-Driven Development for Java ProgrammersTypeScript: Beginner to Advanced

Installation Guide to Jenkins

Updated on 25 September, 2019

8.86K+ views
10 min read

Jenkins is a Java-based open-source automation tool with plugins designed for ongoing integration. Jenkins is used to constantly develop and test software projects that help developers to incorporate project modifications and make it simpler for users to achieve a new build. The Jenkins allows developers to quickly locate and resolve flaws in a code base and to automatically test their structures. Jenkins can be changed and expanded readily on all operating platforms and various devices, whether OS X, Windows or Linux.  It immediately deploys code, produces test reports. During integration and continuous delivery, Jenkins can be configured according to the demands.

Also, read more about how to Install Jenkins on Ubuntu.

System Requirements for Jenkins Installation

Following are the software and hardware requirements for installing Jenkins:

Minimum hardware requirements:

  • 256 MB of RAM
  • 1 GB of drive space (although 10 GB is a recommended minimum if running Jenkins as a Docker container)

Recommended hardware configuration for a small team:

  • 1 GB+ of RAM
  • 50 GB+ of drive space

Installation on Windows

You must first install JDK. Jenkins promotes JDK8 only at this time. Jenkins can be installed when Java is running. The recent Jenkins package for Windows (presently version 2.191) can be downloaded. Click on the Jenkins exe file to unzip the file into a folder.

To begin the installation click on "Next."

 


 

To install Jenkins in another directory, click the "Change..." button. I'll hold the default choice in this instance and click on "Next."

To begin the installation process, click on the "Install" button.

The installation is being processed.

When finished, you can finish the setup by clicking the "Finish" button.

The URL http:/localhost:8080 will automatically be redirected to a Jenkins local page or the browser can be pasted.

Copy and paste the password from the C:\Program Files (x85)\Jenkins\secrets\initialAdminPassword file for Jenkins unlocking. Click on the button "Continue.

The suggested plugins or chosen plugins that you select can be installed. We will install the suggested plugins to maintain it easy.

Wait for the complete installation of plugins.

The next step is to build a Jenkins admin user. Click "Save and Continue." Please enter your information.

To finish the Jenkins setup, click on "Save and Finish."

To begin Jenkins, click on "Start using Jenkins."

Below is the default page of Jenkins.

Jenkins Installation on Linux/CentOS 7 system

Make sure that you are signed in as a user with sudo privileges before continuing this tutorial.

  • The first step is to install Java, Jenkins being a Java application. To set up OpenJDK 8 package, execute the following command:
$ sudo yum install java-1.8.0-openjdk-devel

Jenkins does not currently support Java 10 (and Java 11). Make sure that Java 8 is the default Java version when multiple Java versions are installed on your computer.

  • The next step is to allow the repository of Jenkins. To do so, use the following curl command to import the GPG key:
$ curl --silent --location http://pkg.jenkins-ci.org/redhat-stable/jenkins.repo | sudo tee /etc/yum.repos.d/jenkins.repo

Add your system's repository with:

$ sudo rpm --import https://jenkins-ci.org/redhat/jenkins-ci.org.key
  • Upon activation of the repository, install the recent stable Jenkins version by typing:
$ sudo yum install jenkins
  • Upon completion of the installation, begin the Jenkins service with:
$ sudo systemctl start jenkins
  • To verify if it has been successful, check with below command:
$ systemctl status jenkins
  • Something like this you should see:

Output

jenkins.service - LSB: Jenkins Automation Server

Loaded: loaded (/etc/rc.d/init.d/jenkins; bad; vendor preset: disabled)

Active: active (running) since Thu 2018-09-20 14:58:21 UTC; 15s ago

Docs: man:systemd-sysv-generator(8)

Process: 2367 ExecStart=/etc/rc.d/init.d/jenkins start (code=exited, status=0/SUCCESS)

CGroup: /system.slice/jenkins.service

  • Finally, allow the Jenkins service to start on system boot 
$ sudo systemctl enable jenkins

Output

jenkins.service is not a native service, redirecting to /sbin/chkconfig.

Executing /sbin/chkconfig jenkins on

Opening Firewall port

If you install Jenkins on a remote CentOS firewall-protected server, port 8080 is necessary. To open   the required port, use the following instructions:

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

Setting Jenkins

Open your browser and type in your domain or IP address followed by port 8080 in order to set your fresh Jenkins setup:

http://your_ip_or_domain:8080

Below screen will be displayed which prompts you to enter the admin password generated during setup:

To print the password on your terminal, use the following instructions:

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

The alphanumeric password should be 32 characters long, as shown below:

Output 

3226*****************************

Copy your terminal password, paste it in the password field for the Administrator and click on Continue.

On the next screen, you are asked if you would like to install or pick certain plugins. To begin the installation process instantly, just click on the Install suggested plug-ins box.

When the installation is finished, the first administrative user is prompted for the setting. Fill in all the necessary data. and click the Save and Continue.

On your next page, the URL for the Jenkins instance will be requested. An automatically produced URL will be added to the URL field.

To finish the configuration, click the Save and Finish button to verify the setup.

Finally,  click start using  Jenkins Button to start the process and the user we created in one of the past steps as admin user will log in Jenkins dashboard.

You have effectively mounted Jenkins on your CentOS scheme when you have reached this point.

Jenkins Installation on Mac

Prerequisite

  • A Mac machine with Mac OSX Yosemite or higher with admin access
  • Installation of Java Development Kit on the machine.
  • Access to Git, Svn, etc. remote repository.

Download Jenkins installer.pkg file from Jenkins ' official website and get through the wizard setup.

The jenkins setup wizard sets up a distinct Jenkins user on your system.We need to make some changes in the ‘Users & Groups’ section as well. Do follow below steps.

  • Open ‘System Preferences -> Users & Groups’
  • Click on the Lock icon located in the bottom left corner which reads, ‘Click the lock to make changes’. Enter your login password.
  • Under the ‘Other Users’ section you may see the user without any name but with admin rights. This is our Jenkins user. Let's rename it.
  • Right-click the empty user and select Advanced Options. This will show you all the details. Give the ‘Full name’ as Jenkins. Press OK
  • Click on ‘Reset Password’. Enter a new password and make sure that you remember this.

Now our Jenkins user is almost ready.This is just like another mac user with admin rights.Now restart your Mac machine and log in with Jenkins user with the password which you just reset.

Click the lock to save the changes and restart the system to login with Jenkins user account.

In localhost Jenkins resides at port 8080.

Open your browser, go to localhost:8080 and make the original set-up, which consists of installing some plugins and creating account for safety purpose.

Setting Jenkins as Launch agent

  • Jenkins operates by default as a daemon. A daemon is a non-interactive background that operates in the entire scheme and is not linked to a particular user.
  • Much of CI runs simulators and other GUI apps, so another option is required. You can modify Jenkins as a launch agent to resolve this. On behalf of the user, a launch agent operates behind the scenes.
  • You need to edit the settings folder and alter your place to begin rebooting automatically if you want to alter how the Jenkins process is started.
  • Enter the below command to unload Jenkins as a Daemon
    sudolaunchctlunload/Library/LaunchDaemons/org.jenkins-ci.plist
  • Next, migrate to the LaunchAgents folder the.plist file which defines how Jenkins will be running.
    sudo mv /Library/LaunchDaemons/org.jenkins-ci.plist /Library/LaunchAgents/
  • Start the jenkins again and now it will run as launch agent.