美文网首页
[Jenkins] 局域网无法根据 ip 访问 jenkins

[Jenkins] 局域网无法根据 ip 访问 jenkins

作者: manajay | 来源:发表于2018-05-30 11:10 被阅读128次

    配置

    • brew install jenkins 使用brew 安装的 jenkins

    解决方案

    修改 homebrew.mxcl.jenkins.plisthttpListenAddress0.0.0.0

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
      <dict>
        <key>Label</key>
        <string>homebrew.mxcl.jenkins</string>
        <key>ProgramArguments</key>
        <array>
          <string>/usr/libexec/java_home</string>
          <string>-v</string>
          <string>1.8</string>
          <string>--exec</string>
          <string>java</string>
          <string>-Dmail.smtp.starttls.enable=true</string>
          <string>-jar</string>
          <string>/usr/local/opt/jenkins/libexec/jenkins.war</string>
          <string>--httpListenAddress=0.0.0.0</string>
          <string>--httpPort=8080</string>
        </array>
        <key>RunAtLoad</key>
        <true/>
      </dict>
    </plist>
    
    

    路径:

    • ~/Library/LaunchAgents/homebrew.mxcl.jenkins.plist
    • /usr/local/Cellar/jenkins/版本号/homebrew.mxcl.jenkins.plist

    重启

    brew services stop jenkins
    Stopping `jenkins`... (might take a while)
    ==> Successfully stopped `jenkins` (label: homebrew.mxcl.jenkins)
    
    brew services start jenkins
    ==> Successfully started `jenkins` (label: homebrew.mxcl.jenkins)
    

    相关文章

      网友评论

          本文标题:[Jenkins] 局域网无法根据 ip 访问 jenkins

          本文链接:https://www.haomeiwen.com/subject/sijtsftx.html