mac安装jenkins流程
安装前准备
- java安装和环境配置
- git安装
- Android
- 安装brew
- 安装fir-cli
- 1 安装ruby的工具rvm
1
curl -L https://get.rvm.io | bash -s stable
- 2 查看可用ruby版本
1
rvm list known
- 3 ruby安装
1
rvm install 2.4.0
- 4 查看已安装版本(标志安装成功)
1
ruby -v
- 5 安装fir-cli
1
sudo gem install -n /usr/local/bin fir-cli
安装jenkins
1 | brew install jenkins |
执行jenkins
1 | java -jar /usr/local/Cellar/jenkins/2.202/libexec/jenkins.war --httpPort=8080 |
链接launchd配置文件(作用的是在你的当前用户下创建开启启动连接)
1 | ln -sfv /usr/local/opt/jenkins/*.plist ~/Library/LaunchAgents |
启动jenkins
1 | launchctl load /usr/local/Cellar/jenkins/2.202/homebrew.mxcl.jenkins.plist |
停止jenkins
1 | launchctl unload /usr/local/Cellar/jenkins/2.202/homebrew.mxcl.jenkins.plist |