how to change port number for Jenkins installation In Ubuntu 12.04

前端 未结 5 1536
星月不相逢
星月不相逢 2021-02-02 07:52

I am trying to install jenkins in ubuntu. I have followed the commands below:

wget -q -O - http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key | apt-key add -

e         


        
相关标签:
5条回答
  • 2021-02-02 07:56

    For others still looking for answers you can go to /etc/sysconfig/jenkins in CentOS/RHEL or /etc/default/jenkins in Debian based distributions and change the JENKINS_PORT= variable to whatever port you want. Restart jenkins, and it should be running on your desired port.

    0 讨论(0)
  • 2021-02-02 07:56

    step 1 : sudo nano /etc/default/jenkins open the nano file And change HTTP PORT:8080 to HTTP PORT : 8081

    CTL+X and Click Y and ENTER

    PORT will changing from 8080 to 8081 restart the jenkins

    sudo service jenkins restart

    0 讨论(0)
  • 2021-02-02 08:08

    You can go to /etc/default/jenkins and add --httpPort=9999 or whatever port to JENKINS_ARGS.

    Then you should restart Jenkins with sudo service jenkins restart.

    0 讨论(0)
  • 2021-02-02 08:13
    1. First, run this command to open jenkins configurations:

       sudo nano /etc/default/jenkins
      
    2. The only part you need to change is:

       #port for HTTP connector (default 8080; disable with -1)
       Http_port = 8080
      

      There you need to change to the desired port. For example:

       HTTP_PORT = 8081
      
    3. Finally, Restart Jenkins service by running this command:

       sudo service jenkins restart
      

    Then you're ready to open it with a new port.

    0 讨论(0)
  • 2021-02-02 08:20

    In my case,I add

     HTTP_PORT="XXXX"
     JENKINS_ARGS="--httpPort=XXXX" 
    

    when defining the variables at the beginning of /etc/default/jenkins,it works .

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