Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/macos/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何更改macos中brew安装的jenkins的默认端口?_Macos_Jenkins - Fatal编程技术网

如何更改macos中brew安装的jenkins的默认端口?

如何更改macos中brew安装的jenkins的默认端口?,macos,jenkins,Macos,Jenkins,在macbook pro中,brew安装的jenkins lts 2.492.2具有默认端口8080,但端口8080是其他应用程序的默认端口,因此我想更改jenkins默认端口,如7070 0r 8888。 请帮助**此解决方案适用于基于macos的jenkins brew安装** **This solution for macos based jenkins installation with brew** the Jenkins port on macOS,you

在macbook pro中,brew安装的jenkins lts 2.492.2具有默认端口8080,但端口8080是其他应用程序的默认端口,因此我想更改jenkins默认端口,如7070 0r 8888。 请帮助

**此解决方案适用于基于macos的jenkins brew安装**
    **This solution for macos based jenkins installation with brew**
    
    the Jenkins port on macOS,you must pay attention to the way of installation of Jenkins.
    
    I have installed Jenkins LTS by brew command
    
    brew install jenkins-lts
    
    So my Jenkins plist file is here:
    
    /usr/local/Cellar/jenkins-lts/2.492.2/homebrew.mxcl.jenkins-lts.plist
    
    You can modify the httpPort value from default 8080 to the other value,and then save the file.
    as shown below
    
    **vi homebrew.mxcl.jenkins-lts.plist**
    
    
    <?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-lts</string>
    <key>ProgramArguments</key>
    <array>
      <string>/usr/local/opt/openjdk@11/bin/java</string>
      <string>-Dmail.smtp.starttls.enable=true</string>
      <string>-jar</string>
      <string>/usr/local/opt/jenkins-lts/libexec/jenkins.war</string>
      <string>--httpListenAddress=127.0.0.1</string>
      <string>--httpPort=7070</string>
    </array>
    <key>RunAtLoad</key>
    <true/>
  </dict>
</plist>
    
    You must try these commands(specific to macos) to restart your Jenkins and make the port modification works.
    
    
        brew services stop jenkins-lts
        brew services start jenkins-lts
        
        prkumar@KLL34873 ~ % brew services stop jenkins-lts
        Stopping `jenkins-lts`... (might take a while)
        ==> Successfully stopped `jenkins-lts` (label: homebrew.mxcl.jenkins-lts)
        prkumar@KLL34873 ~ % brew services start jenkins-lts
        ==> Successfully started `jenkins-lts` (label: homebrew.mxcl.jenkins-lts)
    
    Note:If you installed Jenkins LTS,you must pay attention that your command must be jenkins-lts, not jenkins.
在macOS上的Jenkins端口,您必须注意Jenkins的安装方式。 我已通过brew命令安装了Jenkins LTS brew安装jenkins lts 我的Jenkins plist文件在这里: /usr/local/ceral/jenkins-lts/2.492.2/homebrew.mxcl.jenkins-lts.plist 您可以将httpPort值从默认值8080修改为其他值,然后保存该文件。 如下图所示 **vi homebrew.mxcl.jenkins-lts.plist** 标签 homebrew.mxcl.jenkins-lts 程序参数 /usr/本地/opt/openjdk@11/bin/java -Dmail.smtp.starttls.enable=true -罐子 /usr/local/opt/jenkins-lts/libexec/jenkins.war --httplistenadress=127.0.0.1 --httpPort=7070 运行负荷 您必须尝试这些命令(特定于macos)来重新启动Jenkins并使端口修改生效。 brew服务阻止jenkins lts brew服务启动jenkins lts prkumar@KLL34873~%brew服务停止jenkins lts 停止“jenkins lts”。。。(可能需要一段时间) ==>已成功停止“jenkins lts”(标签:homebrew.mxcl.jenkins lts) prkumar@KLL34873~%brew服务启动jenkins lts ==>已成功启动“jenkins lts”(标签:homebrew.mxcl.jenkins lts) 注意:如果您安装了Jenkins LTS,您必须注意您的命令必须是Jenkins LTS,而不是Jenkins。