Fastest and Easiest Way to Install Jenkins on Mac
The fastest and easiest way to install Jenkins on a Mac is by using Homebrew.
If you don’t know what Homebrew is or how to install it, check this link for more information: https://brew.sh/
Step 1:
Install Homebrew, see https://brew.sh/
Step 2:
You will need Java/Java Development Kit (JDK) installed. This can also be done via Homebrew, open a terminal window and type:
brew cask install homebrew/cask-versions/java8
- You can install whatever version of Java needed, at the time of this entry I needed Java 8.
Once Java has been installed you’ll see some comments from Homebrew in the terminal telling you it was a success:
installer: Package name is JDK 8 Update 192installer: Upgrading at base path /installer: The upgrade was successful.🍺 java8 was successfully installed!
Step 3:
Install Jenkins, in the same terminal window type:
brew install jenkins
Once Jenkins is installed Homebrew will give some information in terminal such as:
Note: When using launchctl the port will be 8080.To have launchd start jenkins now and restart at login:brew services start jenkinsOr, if you don’t want/need a background service you can just run:jenkins==> Summary🍺 /usr/local/Cellar/jenkins/2.154: 7 files, 76MB, built in 21 seconds
If you want to run it as a service in the background automatically you can choose the first option: brew services start jenins
or go with the second option and type jenkins
in the terminal anytime you need access to Jenkins.
Step 4:
Once you start Jenkins from Step 3, visit localhost:8080 in any browser and follow the prompts. Congratulations! You just installed Jenkins on your Mac :-)