Mac配置Jenkins一:安装Jenkins
前言
之前安装了好几次Jenkins,但是笔记都丢了,现在重新记录
安装brew
https://brew.sh/zh-cn/
1
2
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
eval "$(/opt/homebrew/bin/brew shellenv)"
一、安装Jenkins
安装: brew install jenkins-lts
默认初始密码位置:/Users/xxxx/.jenkins/secrets/initialAdminPassword
安装好后,根据提示设置好初始化密码,创建账号
IP访问
Jenkins安装好后,默认只能使用http://127.0.0.1:8080或http://localshost:8080进行访问,如果需要使用内网或公网IP进行访问,解决办法
1
2
3
4
5
6
7
8
# 修改如下配置,将
# intel芯片电脑地址httpListenAddress设置成0.0.0.0就可以
/usr/local/Cellar/jenkins-lts/x.x.x/homebrew.mxcl.jenkins-lts.plist
# M1电脑地址
cd /opt/homebrew/opt/jenkins-lts/
/opt/homebrew/Cellar/jenkins/x.x.x/homebrew.mxcl.jenkins.plist
/opt/homebrew/Cellar/jenkins-lts/homebrew.mxcl.jenkins-lts.plist
# 将上面两个plist中的httpListenAddress后的ip地址,修改为本机IP或者0.0.0.0即可。
二、Jenkins常用插件
- Jenkins常用插件汇总以及简单介绍 权限管理插件
Role-based Authorization Strategy
git管理插件:Git Parameter Plugin
构建人:build user vars plugin
常见操作命令
1
2
3
4
5
6
安装: brew install jenkins-lts
重装: brew reinstall jenkins-lts
启动: brew services start jenkins-lts
关闭: brew services stop jenkins-lts
重启: brew services restart jenkins-lts
升级: brew upgrade jenkins-lts
1、重启Jenkins http://localhost:8080/restart 2、关闭Jenkins http://localhost:8080/exit
This post is licensed under CC BY 4.0 by the author.