How to start jenkins on different port rather than 8080 using command prompt in Windows?

后端 未结 16 857
我在风中等你
我在风中等你 2020-12-04 08:02

I have jenkins.war and I started it from command prompt in Windows as:

java -jar jenkins.war

It was started well and easily browsed as

相关标签:
16条回答
  • 2020-12-04 08:32

    Open the jenkins.xml in the jenkins home folder (usually C:\Program Files (x86)\Jenkins) and change the port number:
    httpPort=xxxx
    to
    httpPort=yyyy
    then restart the service. it should change the setting permanently.

    0 讨论(0)
  • 2020-12-04 08:34

    Use the following command at command prompt:

    java -jar jenkins.war --httpPort=9090
    

    If you want to use https use the following command:

    java -jar jenkins.war --httpsPort=9090
    

    Details are here

    0 讨论(0)
  • 2020-12-04 08:34

    On Windows (with Windows Service).

    Edit the file C:\Program Files (x86)\Jenkins\jenkins.xml with 8083 if you want 8083 port.

    <arguments>-Xrs -Xmx256m -Dhudson.lifecycle=hudson.lifecycle.WindowsServiceLifecycle -jar "%BASE%\jenkins.war" --httpPort=8083</arguments>
    
    0 讨论(0)
  • 2020-12-04 08:34

    Add the following two lines after DAEMON_ARGS in the file /etc/init.d/jenkins

    HTTP_PORT=8010
    JENKINS_ARGS="--httpPort=$HTTP_PORT"

    0 讨论(0)
提交回复
热议问题