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

后端 未结 16 909
我在风中等你
我在风中等你 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条回答
  •  Happy的楠姐
    2020-12-04 08:30

    In *nix In CentOS/RedHat

    vim /etc/sysconfig/jenkins

    # Port Jenkins is listening on.
    # Set to -1 to disable
    #
    JENKINS_PORT="8080"
    

    In windows open XML file C:\Program Files (x86)\Jenkins\jenkins.xml

    %BASE%\jre\bin\java
      -Xrs -Xmx256m -Dhudson.lifecycle=hudson.lifecycle.WindowsServiceLifecycle -jar "%BASE%\jenkins.war" --**httpPort=8083**
     i made  above bold  to show you change then 
     %BASE%\jre\bin\java
      -Xrs -Xmx256m -Dhudson.lifecycle=hudson.lifecycle.WindowsServiceLifecycle -jar "%BASE%\jenkins.war" --httpPort=8083
    

    now you have to restart it doesnot work unless you restart http://localhost:8080/restart then after restart http://localhost:8083/ all should be well so looks like the all above response which says it does not work We have restart.

提交回复
热议问题