Jak uruchomić jenkins na innym porcie niż 8080 za pomocą wiersza polecenia w systemie Windows?

Mam Jenkinsa.war I ja uruchomiłem go z wiersza polecenia w Windows jako:

java -jar jenkins.war

Został uruchomiony dobrze i łatwo przeglądane jako http://localhost:8080

Chcę zacząć od portu 9090. Jak mogę to zrobić?
Author: Ripon Al Wasim, 2013-03-07

14 answers

Użyj następującego polecenia w wierszu polecenia:

java -jar jenkins.war --httpPort=9090

Jeśli chcesz użyć https użyj następującego polecenia:

java -jar jenkins.war --httpsPort=9090

Szczegóły są tutaj

 158
Author: Ripon Al Wasim,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2013-03-07 08:06:34

Otwórz jenkins.xml w folderze domowym jenkins (zwykle C:\Program Files (x86)\Jenkins) i zmień numer portu:
httpPort=xxxx
do
httpPort=yyyy
następnie uruchom ponownie usługę. powinno to zmienić ustawienie na stałe.

 85
Author: Prasad,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2015-04-28 20:11:22

Z Ubuntu 14.4 musiałem zmienić plik / etc / default / jenkins

Np.

   #HTTP_PORT=8080
   HTTP_PORT=8083

I uruchom ponownie usługę

service jenkins restart

 66
Author: christian,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2015-03-10 15:48:48

In CentOS / RedHat

Vim /etc / sysconfig / jenkins

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

Zmień go na dowolny port.

 39
Author: kanibalv,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2014-10-23 21:11:54

W systemie Windows (z usługą Windows).

Edytuj plik C:\Program Files (x86)\Jenkins\jenkins.xml z 8083 Jeśli chcesz port 8083.

<arguments>-Xrs -Xmx256m -Dhudson.lifecycle=hudson.lifecycle.WindowsServiceLifecycle -jar "%BASE%\jenkins.war" --httpPort=8083</arguments>
 13
Author: sgrillon,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2015-04-28 20:09:28

Z korzyścią dla użytkowników Linuksa, którzy się tu znaleźli: znalazłem /etc / sysconfig / jenkins ma JENKINS_PORT="8080", który prawdopodobnie powinieneś też zmienić.

 10
Author: djb,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2014-08-26 09:32:32

Możesz zadzwonić

java -jar jenkins.war --help

Aby zobaczyć listę wszystkich dostępnych parametrów.

 4
Author: user2081279,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2014-10-15 12:51:08

Dla Fedora, RedHat, CentOS podobnie, wszelkie modyfikacje powinny być wykonywane w /etc/sysconfig/jenkins zamiast /etc/init.d/jenkins. Celem pierwszego pliku jest dokładnie dostosowanie drugiego pliku.

Zatem wewnątrz /etc/sysconfig/jenkins znajduje się zmienna JENKINS_PORT, która przechowuje numer portu, na którym działa Jenkins.

 4
Author: Younes,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2015-02-12 15:44:05

Aby zmienić domyślny port 8080. Wszystko co musisz zrobić:

  1. Goto Jenkins folder obecny w C:\Program Files (x86)
  2. Otwórz Notatnik lub pad tekstowy i uruchom je jako administrator, a następnie spróbuj otworzyć jenkins.plik XML znajdujący się w folderze jenkins.
  3. Zmień numer portu jak poniżej: <arguments>-Xrs -Xmx256m -Dhudson.lifecycle=hudson.lifecycle.WindowsServiceLifecycle -jar "%BASE%\jenkins.war" --httpPort=9090</arguments>
  4. Kliknij Zapisz.
 4
Author: Vinodh Aj,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2016-02-23 16:33:49

In * nix W CentOS / RedHat

Vim / etc/sysconfig / jenkins

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

W systemie Windows otwórz plik XML C:\Program Files (x86) \ Jenkins\jenkins.xml

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

Teraz musisz zrestartować to nie działa, chyba że zrestartujesz http://localhost:8080/restart następnie po ponownym uruchomieniu http://localhost:8083 / wszystko powinno być dobrze, więc wygląda na to, że wszystkie powyższe odpowiedzi, które mówią, że nie działa, mamy restart.

 4
Author: Jin Thakur,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2016-03-29 20:10:29

Dodaj następujące dwie linie po DAEMON_ARGS w pliku /etc/init.d/jenkins

HTTP_PORT=8010
JENKINS_ARGS= "--httpPort=$HTTP_PORT "

 3
Author: Vimal Mathew,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2015-01-28 14:16:40

Poprawne, użyj parametru --httpPort. Jeśli chcesz również podać $JENKINS_HOME, możesz zrobić tak:

java -DJENKINS_HOME=/Users/Heros/jenkins -jar jenkins.war  --httpPort=8484
 3
Author: mainframer,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2015-05-19 15:20:27

Na OSX edycja pliku:

/usr/local/Cellar/jenkins-lts/2.46.1/homebrew.mxcl.jenkins-lts.plist

I edytować port do Twoich potrzeb.

 1
Author: Pauls Bebris,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2017-06-29 13:19:57

Zmień ' / etc / init.d / powłoka Jenkinsa

check_tcp_port "http" "$HTTP_PORT" "8080" || return 1

Zmień 8080 na cokolwiek chcesz

 -1
Author: Kamel,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2014-07-23 06:42:35