Ensure you have Homebrew installed on your Mac. If not, you can install it using:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
-
Install Java using Homebrew:
brew install java11
This will install OpenJDK 11.
-
Set JAVA_HOME Environment Variable: (Optional)
After installation, you need to set the
JAVA_HOME
environment variable. The lines will be populated in the logs of java installation. The lines might look like the below examples.export PATH="/opt/homebrew/opt/openjdk@11/bin:$PATH" >> ~/.zshrc export JAVA_HOME=$(/usr/libexec/java_home -v 11) export PATH=$JAVA_HOME/bin:$PATH
-
Install Jenkins LTS using Homebrew:
brew install jenkins-lts
-
Start Jenkins:
brew services start jenkins-lts
Jenkins will start automatically and run as a background service.
-
Access Jenkins:
Open your web browser and navigate to:
http://localhost:8080
-
Unlock Jenkins:
You’ll need to unlock Jenkins using the initial admin password. Find the password with:
cat /Users/$(whoami)/.jenkins/secrets/initialAdminPassword
Copy the password and paste it into the Jenkins unlock page.
-
To install the latest minikube stable release on x86-64 macOS using binary download::
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-darwin-amd64 sudo install minikube-darwin-amd64 /usr/local/bin/minikube
-
Start Minikube:
minikube start
This will start Minikube with default settings.
-
Verify Minikube Status:
minikube status
minikube stop
brew services stop jenkins-lts
brew uninstall jenkins-lts
brew uninstall java11
You have successfully installed Java, Jenkins LTS, and Minikube on your Mac using Homebrew. Ensure to check each tool's documentation for advanced configurations and troubleshooting.