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

后端 未结 16 959
我在风中等你
我在风中等你 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:22

    If you have configured jenkins on ec2 instance with linux AMI and looking to change the port. Edit the file at

    sudo vi /etc/sysconfig/jenkins
    

    Edit

    JENKINS_PORT="your port number"
    

    Exit vim

    :wq
    

    Restart jenkins

    sudo service jenkins restart
    

    Or simply start it, if its not already running

    sudo service jenkins start
    

    To verify if your jenkins is running on mentioned port

    netstat -lntu | grep "your port number"
    

提交回复
热议问题