How to Change Jenkins HTTP port number?

How to Change Jenkins HTTP port number?

Change a jenkins web http port in Windows
Step 1 – Stop the jenkins services
Step 2 – Go to the directory where you installed the Jenkins (In default, it is under Program Files/Jenkins)
Step 3 – Open the Jenkins.xml
Step 4 – Search –httpPort=8080 and replace the 8080 with the new port number that you wish.
Step 5 – Start the jenkins services

Change a jenkins Slave/Agent port in Windows

Step 1 – Stop the jenkins services
Step 2 – Go to the directory where you installed the Jenkins (In default, it is under Program Files/Jenkins)
Step 3 – Open the config.xml
Step 4 – Search “<slaveAgentPort>50000</slaveAgentPort>” and replace the 50000 with the new port number that you wish.
Step 5 – Start the jenkins services

Change a Jenkins web http port in Linux
Step 1 – Stop the Jenkins services

Step 2 – Know the information about Jenkins installation using the command “ps -eaf | grep Jenkins”

Step 3 – edit /etc/init.d/jenkins and look for jenkins config file “JENKINS_CONFIG=/etc/sysconfig/jenkins”

Step 4 – edit /etc/sysconfig/Jenkins and modify JENKINS_PORT=”8080″

Step 5 – Start the Jenkins services

Rajesh Kumar
Follow me