Mac下修改jenkins的端口
之前用Homebrew命令安装的jenkins,安装后jenkins默认的端口号是8080,与我们的tomcat端口是一致的(本地服务器使用 https://www.jianshu.com/p/64612eca3d43),如果想要修改jenkins的端口号,该如何修改呢?下面介绍两种修改jenkins的端口号的方式,
用brew安装的的Jenkins
修改默认端口的方法:
1、打开文件 vi /usr/local/Cellar/jenkins/2.190/homebrew.mxcl.jenkins.plist
路径视自己jenkins版本而定
图片.png
2、修改默认端口号
图片.png
启动jenkins:
brew services start jenkins
停止jenkins:
brew services stop jenkins
重启Jenkins:
brew services restart jenkins
安装包安装的Jenkins
先关闭jenkins ;
命令行下修改端口:
sudo defaults write /usr/local/Cellar/jenkins/2.190/bin/jenkins-cli httpPort 8081
启动jenkins:
sudo launchctl load /usr/local/Cellar/jenkins/2.190/homebrew.mxcl.jenkins.plist
停止jenkins:
sudo launchctl unload /usr/local/Cellar/jenkins/2.190/homebrew.mxcl.jenkins.plist
网友评论