Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to change port number for Jenkins installation In Ubuntu 12.04

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 -  echo deb http://pkg.jenkins-ci.org/debian binary/ > /etc/apt/sources.list.d/jenkins.list 

then

apt-get update 

and

apt-get install jenkins 

but It shows

  • Starting Jenkins Continuous Integration Server Jenkins The selected http port (8080) seems to be in use by another program Please select another port to use for jenkins

Need help on how to set a different port for Jenkins to run.

like image 964
RCBian Avatar asked Feb 05 '15 09:02

RCBian


People also ask

How do I change the default port for Jenkins in Ubuntu?

Open the file using a text editor such as Notepad or Notepad++. Scroll down until you find the line that contains --httpPort=8080 and change the number to the port you want to set. Note: If you are using HTTPS with Jenkins, use java -jar jenkins. war --httpsPort=[port number] to change the port in the command prompt.


1 Answers

First open the /etc/default/jenkins file.
Then under JENKINS_ARGS section, you can change the port like this HTTP_PORT=9999.

Then you should restart Jenkins with sudo service jenkins restart.

Then to check the status use this command sudo systemctl status jenkins

like image 101
Alexandru C. Avatar answered Oct 08 '22 05:10

Alexandru C.