1.安装Homebrow
在终端运行以下指令安装:/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)",
安装成功后显示:
==> Installation successful!==> Homebrew has enabled anonymous aggregate formulae and cask analytics.Read the analytics documentation (and how to opt-out) here:https://docs.brew.sh/AnalyticsNo analytics data has been sent yet (or will be during this `install` run).==> Homebrew is run entirely by unpaid volunteers. Please consider donating:https://github.com/Homebrew/brew#donations==> Next steps:- Run `brew help` to get started- Further documentation: [https://docs.brew.sh](https://docs.brew.sh)。
执行 brew -v 来查看安装版本。
2.修改Jenkins依赖的JDK版本
执行mdfind jenkins找到homebrew下的jenkins文件:jenkins.rb和jenkins-lts.rb,把JDK的版本改成系统安装的版本。
3.安装Jenkins
执行brew install jenkins-lts进行安装。