修改启动用户

先停止jenkins服务

sh
1
2
sudo launchctl unload /Library/LaunchDaemons/org.jenkins-ci.plist
sudo vim /Library/LaunchDaemons/org.jenkins-ci.plist

授权jenkins工作目录和临时目录

text
1
2
sudo chown -R zhulangren:wheel /Users/Shared/Jenkins/
sudo chown -R zhulangren:wheel /var/log/jenkins/

启动jenkins

text
1
sudo launchctl load /Library/LaunchDaemons/org.jenkins-ci.plist

jenkins自启动文件路径

text
1
/Library/LaunchDaemons/org.jenkins-ci.plist

卸载脚本文件

text
1
/Library/Application\ Support/Jenkins/Uninstall.command

修改jenkins启动端口

text
1
sudo defaults write /Library/Preferences/org.jenkins-ci httpPort '9999'

读取jenkins配置文件

text
1
defaults read /Library/Preferences/org.jenkins-ci

设置自启动

text
1
sudo launchctl load /Library/LaunchDaemons/org.jenkins-ci.plis

取消自启动

text
1
sudo launchctl unload /Library/LaunchDaemons/org.jenkins-ci.plist

jenkins war路径

text
1
/Applications/Jenkins/jenkins.war

Reference