安裝包安裝的Jenkins
修改默認端口的方法:命令行
- 先關閉jenkins ;
- 命令行下修改端口:sudo defaults write /Library/Preferences/org.jenkins-ci httpPort 7071
- 啓動jenkins
- 啓動jenkins: sudo launchctl load /Library/LaunchDaemons/org.jenkins-ci.plist
- 中止jenkins:sudo launchctl unload /Library/LaunchDaemons/org.jenkins-ci.plist
用brew安裝的的Jenkins
修改默認端口的方法:rest
- 打開文件 vi /usr/local/opt/jenkins/homebrew.mxcl.jenkins.plist
- 修改默認端口號
- 啓動jenkins: brew services start jenkins
- 中止jenkins:brew services stop jenkins
- 重啓Jenkins:brew services restart jenkins
- 更新:切換到目錄cd ~/.jenkins,而後用最新下載的war包替換文件夾中的war