使用 brew 安装 Jenkins 配置局域网访问

使用 brew 安装 Jenkins

brew install Jenkins

启动 Jenkins

brew services start Jenkins

关闭 Jenkins

brew services stop Jenkins

重启 Jenkins

brew services restart Jenkins

使用brew 安装 Jenkins ,会解决一些权限等问题,但是默认配置 为 localhost:8080
需要修改端口,以避免配置冲突,文件路径:

where jenkins

使用 where 命令查询 Jenkins 路径,
/opt/homebrew/bin/jenkins
那么修改 /opt/homebrew/Cellar/jenkins/2.304/homebrew.mxcl.jenkins.plist
文件





    Label
    homebrew.mxcl.jenkins
    ProgramArguments
    
        /opt/homebrew/opt/openjdk@11/bin/java
        -Dmail.smtp.starttls.enable=true
        -jar
        /opt/homebrew/opt/jenkins/libexec/jenkins.war
        --httpListenAddress=0.0.0.0
        --httpPort=8089
    
    RunAtLoad
    


修改 端口 httpPort 为 8089,httpListenAddress 为 0.0.0.0 或者 本机 IP地址。

同时修改 Library/LaunchAgents/homebrew.mxcl.jenkins.plist 文件,重启 Jenkins 生效。

你可能感兴趣的:(使用 brew 安装 Jenkins 配置局域网访问)