# 使用HomeBrew 建立Jenkins [官網文件 ](https://www.jenkins.io/doc/) 1.[安裝brew](https://brew.sh/) `/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.` [修改目錄](https://stackoverflow.com/questions/76632081/cannot-change-jenkins-home-path-on-mac) 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`
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up