1.安裝brew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
2.brew設定環境變數
echo 'eval $(/opt/homebrew/bin/brew shellenv)' >> /User/gaiya/.zprofile
//gaiya = your user name
3.brew 安裝Jenkins
brew install jenkins-lts
4.brew 啟動Jenkins
brew services start jenkins-lts
brew services stop jenkins-lts
5.使用ip訪問,brew上的Jenkins,修改路徑的plist,將httpListenAddress的ip,修改本機IP或者0.0.0.0,並重啟
~/Library/LaunchAgents/homebrew.mxcl.jenkins.plist
/usr/local/opt/jenkins/homebrew.mxcl.jenkins.plist
https://blog.csdn.net/sinat_37865456/article/details/123844525
6.簡易設定參考
https://www.cnblogs.com/muzzik/p/17045100.html
7.JenkinsHome
MAC預設目錄 ~/.jenkins.
修改目錄
Brew在MAC上使用launchctl,因此需要修改/etc/launchd.conf
launchctl setenv JENKINS_HOME /Users/whoami/workSpace
https://www.jenkins.io/doc/book/managing/system-configuration/
使用shell修改目錄(brew不適用)
export JENKINS_HOME=/path/to/your/jenkins/home