MacOS install jenkins

安装

brew install jenkins-lts

安装完成输出如下:
Note: When using launchctl the port will be 8080.
To have launchd start jenkins-lts now and restart at login:
  brew services start jenkins-lts
Or, if you don't want/need a background service you can just run:
  jenkins-lts

常用命令

  1. 启动jenkins服务
brew services start jenkins-lts
or
jenkins-lts
  1. 停止jenkins服务
brew services stop jenkins-lts
  1. 重启jenkins服务
brew services restart jenkins-lts
  1. 更新jenkins版本
brew upgrade jenkins-lts
  1. 手动启动jenkins服务
sudo launchctl load /Library/LaunchDaemons/org.jenkins-ci.plist
  1. 手动停止jenkins服务
sudo launchctl unload /Library/LaunchDaemons/org.jenkins-ci.plist

访问地址

http://localhost:8080

首次配置

  1. 终端启动jenkins
jenkins-lts

输出日志:
Jenkins initial setup is required. An admin user has been created and a password generated.
Please use the following password to proceed to installation:

6f0e25f9281943c9b6bb6a1f8e986bdd

This may also be found at: /Users/luoxiaolei/.jenkins/secrets/initialAdminPassword
  1. 浏览器访问jenkins首页
http://localhost:8080

image
3. 修改镜像地址

vi hudson.model.UpdateCenter.xml
将
https://updates.jenkins.io/update-center.json
更改为
https://mirrors.tuna.tsinghua.edu.cn/jenkins/updates/update-center.json

image

  1. 安装推荐的插件
    image
    image

  2. 设置管理员用户名及密码
    image

  3. 完成
    image

  4. 打开jenkins
    image

参考链接

posted on 2020-05-20 22:30  Simle  阅读(279)  评论(0编辑  收藏  举报