mac 下修改 jenkins 端口以及Jenkins的啓動、關閉與更新

安裝包安裝的Jenkins
修改默認端口的方法:命令行

  1. 先關閉jenkins ;
  2. 命令行下修改端口:sudo defaults write /Library/Preferences/org.jenkins-ci httpPort 7071
  3. 啓動jenkins
  4. 啓動jenkins: sudo launchctl load /Library/LaunchDaemons/org.jenkins-ci.plist
  5. 中止jenkins:sudo launchctl unload /Library/LaunchDaemons/org.jenkins-ci.plist

 

用brew安裝的的Jenkins
修改默認端口的方法:rest

  1. 打開文件 vi /usr/local/opt/jenkins/homebrew.mxcl.jenkins.plist
  2. 修改默認端口號
    • 啓動jenkins: brew services start jenkins
    • 中止jenkins:brew services stop jenkins
    • 重啓Jenkins:brew services restart jenkins
    • 更新:切換到目錄cd ~/.jenkins,而後用最新下載的war包替換文件夾中的war
相關文章
相關標籤/搜索