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

How to Install Jenkins on Mac? [Step-By-Step Guide]

By Mayank Modi

Updated on Jun 10, 2021 | 8 min read

Share:

Jenkins is a Java-built open-source Continuous Integration (CI) and Continuous Deployment (CD) platform. Basically, Jenkins builds software projects, checks and deploys them. This is one of the most practical programming tools you can master, and today we will show you how to install Jenkins on macOS, and how to use this powerful tool to activate your VPS server. VPS copies a dedicated server environment in a shared server.

Jenkins is loved by teams of all sizes, for different language projects like Java, Ruby, Dot Net, PHP etc. Jenkins is a platform that is autonomous, and can be used on Windows, Mac or any other operating system.

In this article, we will learn how to install Jenkins on Mac OS. In addition, check the detailed blog on Install Jenkins on Ubuntu.

What is Jenkins? 

Jenkins is an open-source system that supports continuous development of integration and delivery, which allows a series of tasks for making a software product – building, testing and deployment, to be automated.

Jenkins includes plug-ins facilitating continuous integration. The process often provides continuous integration, allowing developers and DevOps engineers to produce new builds effortlessly. That’s why it's important to follow Jenkins download Mac or Windows for streamlining processes and testing software easily. In my opinion, you can also use different testing and deployment strategies when continuously releasing the software.

Why is Jenkins So Popular?

  • Easy to use: simple, intuitive, and visually appealing user interface
  • Extensibility: Jenkins is highly versatile and easy to adapt to your requirements. With various functionalities, there are thousands of open-source Plugins.

Jenkins supports various version control systems, code indicators, notifiers, user interface adaptations, and more!

How Does Jenkins Work?

As a WAR archive and as an Installer package, Jenkins is distributed as a Homebrew package, an image in the Docker and as source code for the main operating systems. Most of the source code is in Java and contains several Groovy, Ruby, and Antlr files.

You can run the Jenkins WAR on a Java application server such as Tomcat on your own or as a servlet. In any event, the web user interface is created and calls to its REST API are accepted.

When you first run Jenkins, you create a long random password for the administrative user, which you may paste in your first webpage to unlock the installation.

Prerequisites to Install Jenkins on Mac

We will be going to run multiple jobs on Jenkins, so we need some proper configurations.

A. Hardware Requirements

  • Minimum requirement:
    • RAM– 256 MB 
    • Storage- 1 GB of Hard Disk Space 
  • For small teams(recommended):
    • RAM- 4 GB 
    • Storage- more than 50 GB of Hard Disk Space 

B. Software Requirements

The following list shows the minimum software requirements:

  • Java: Java Development Kit (JDK) or Java Runtime Environment (JRE). 
  • Web Browser: Any browser such as Google Chrome, Mozilla Firefox, Microsoft Edge, Safari
  • Operating System: macOS

Two Ways to Install Jenkins on macOS

We will discuss two ways to install Jenkins on mac:

  • Using Homebrew package
  • Using Docker

Method 1: How to Install Jenkins on Mac Using Homebrew

Step1: Install Homebrew

You can install Homebrew with the following command:

$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

You can check the Homebrew installation using:

$ brew  -–version

Step 2: Install Java

Skip to the next section if you have Java already installed on your system.

Being an open-source Java application, Jenkins requires the installation of OpenJDK 8 on your system. The apt repositories can directly access OpenJDK 8.

The installation of OpenJDK from standard repositories is recommended. Open and enter the following in the terminal window:

$ brew install java

Step 3: Install Jenkins

After Homebrew has been installed, it is required to execute the command that downloads and installs the latest version of Jenkins' Long-Term Support (LTS).

$ brew install jenkins-lts

Step 4: Start the Server

You can run the following command to start the Jenkins server finally.

$ brew services start jenkins-lts

The above command will start the Jenkins server soon. 

The port will be 8080. You can check it by visiting Jenkins on its default 8080 port with your server domain name or IP address: http://localhost:8080/

Step 5: Unlock Jenkins

The Unlock Jenkins screen displays the initial password's location:

Use the cat command to display the password:

$ cat <path  you receive after visiting http://localhost:8080/>

In this case,

$ cat /Users/ijs/.jenkins/secrets/initialAdminPassword

Copy the 32-character password and paste it into the Administrator Password field, then click Continue.

We will discuss the steps to complete the setup Jenkins on mac process at the end in the section How to configure Jenkins?

Method 2: Install Jenkins in macOS Using Docker

Please note that recent versions of Windows were equipped with native support for running Docker images, while Jenkins still provides only Linux-based Docker images. Thus, most of the commands that are outlined above work well with Windows and macOS because they run Linux Docker images via virtualization.

Follow the below procedure to install Jenkins MacOS from a Docker image

Step 1: Install Docker

It's pretty easy to install Docker on Mac. It has a file with the .dmg graphical installer. Docker Engine, CLI client, Compose, Kitematic and Docker Machine, provided for installation.

1. Download Docker from install docker desktop. You will get a .dmg file  

2. Click on the .dmg file and it will ask you to move the Docker app to the Application Folder.

3. Once the Docker icon has been dragged to the Applications folder, double-click the Docker icon and you will be asked if you want to open the App. Click on yes, to open Docker installer.

4. Click on the Next button and after this, it will ask you to install tools and will ask your permissions to proceed:

5. Now, you will see the Docker icon on the toolbar, which means that Docker is starting on your system.

Step 2: Run the Jenkins Docker image

After installation and set-up of Docker, you can run the following command to install Jenkins for mac:

$ docker run -p 8080:8080 -p 50000:50000 -v ~/jenkins_home:/var/jenkins_home jenkins/jenkins:lts

This command will download Jenkins' current version of Long-Term Support (LTS) and spin a new Docker container. This might take time for installation.

Step 3: Get the installation password

You will be asked for the administrator password and you will also see the location where you can find it when you visit Jenkins on its default 8080 port with your server domain name or IP address: http://localhost:8080/

We can refer to the steps above for the location of the password.

How to Configure Jenkins on Mac?

After the installation of Jenkins, we have to configure Jenkins to make it ready.

Step 1: Install Plugins

Jenkins has many plugins that can integrate with open-source project. The next move requires the installation of suitable plugins as per your requirement.  You can easily add or delete plugins later.  As of now we can simply install the suggested plugins.

Jenkins is currently the leading open-source automation server for all types of development work with around 1600 plugins. These 1,600 plug-ins cover five fields: platforms, UI management, management of source code, and build management most commonly.

Now, you have to create an admin user account. Make sure you note down the username and password as they would be needed later.

Step 2: Jenkins URL Configuration

The last step is to configure the URL for the server.

Click Save and Finish once you have confirmed the relevant information. A confirmation page will show you that "Jenkins is ready!"

Finally, click on Start using Jenkins and you will see a dashboard.

How to Start and Stop Jenkins?

A. When you install Jenkins using Homebrew

Run the following command to stop the Jenkins server:

$ brew services stop jenkins-lts

Run the following command to restart the server again:

$ brew services restart jenkins-lts

B. When you install Jenkins using Docker

To stop Jenkins, go to the terminal window where the Docker container was started and enter command + C. This will stop the Docker container from running and also stop Jenkins.

If you need to restart Jenkins, execute the same command that you used while installing Jenkins.

How to Uninstall Jenkins on Mac?

Jenkins is an automation platform focused on servers and is usually concerned with security. Jenkins also requires add-ons for projects written in languages other than Java. These additional components normally bloat Jenkins. Follow the steps to see how to uninstall Jenkins on Mac when you're having trouble or notice that Jenkins doesn't work on Mac.

If you have installed Jenkins using Homebrew then you should run the following commands to uninstall Jenkins:

$ brew uninstall jenkins --force
$ brew cleanup

Learn more about the core concepts of Jenkins Jobs, Pipelines, Distributed System, Plugins with Jenkins Certification Course.

Why Use Jenkins?

To understand Jenkins, you will need to consider continuous integration (CI) and continuous delivery (CD):

  • Continuous integration: the practice of continually merging the working copies of developers with the main repository.
  • Continuous delivery: constantly delivering the code to an area once it is ready for delivery. It could be for production or staging. The commodity is supplied to a consumer base that can provide QA or inspection by customers.

Developers update the code regularly in the shared repository (such as GitHub or TFS). Improvements made in the source code are made at the end of the day together, making it difficult to identify the errors. To avoid this, Jenkins is used here.

Once a developer changes the repository, Jenkins will automatically enable the build and immediately warn you in the event of an error (Continuous Integration CI).

We can also automate the post-construction tests with Jenkins (unit test, success test, acceptance test). Jenkins will conduct these tests and produce a report whenever progress is achieved (Continuous Delivery CD).

Conclusion

Installing Jenkins on mac is very easy. Jenkins has a low learning curve and you can start to work with it as quickly as possible. There are some popular alternatives to Jenkins. One of these tools is Zuul, which does not allow broken code to integrate into your main branch, with various gate configurations like inter-project testing, cross-project dependencies and testing in parallel.

In this tutorial, you have learnt to install Jenkins on macOS using the packages provided by the project. You have started the server, opened the firewall, and created an administrative user. Also, remember to continuously learn fundamentals by enrolling in a good course. My preferred course is the KnowldgeHut DeveOps Foundation course, where you’ll learn everything from scratch. Once you get started, you can become the holder of a highly effective automation mechanism that allows for code construction, testing, and launching.

Frequently Asked Questions (FAQs)

1. Do I need to have Java installed to run Jenkins on Mac?

2. How do I secure Jenkins after installation?

3. Where can I find the Jenkins home directory on Mac?

Mayank Modi

86 articles published

Get Free Consultation

+91

By submitting, I accept the T&C and
Privacy Policy

Suggested Blogs