¿Cómo iniciar jenkins en un puerto diferente en lugar de 8080 utilizando el símbolo del sistema en Windows?
Tengo a Jenkins.war y yo lo iniciamos desde el símbolo del sistema en Windows como:
java -jar jenkins.war
Se inició bien y se exploró fácilmente como http://localhost:8080
Quiero comenzar en el puerto 9090. ¿Cómo puedo hacer eso?
14 answers
Utilice el siguiente comando en el símbolo del sistema:
java -jar jenkins.war --httpPort=9090
Si desea utilizar https utilice el siguiente comando:
java -jar jenkins.war --httpsPort=9090
Los detalles están aquí
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2013-03-07 08:06:34
Abra el jenkins.xml
en la carpeta de inicio de jenkins (normalmente C:\Program Files (x86)\Jenkins
) y cambie el número de puerto: httpPort=xxxx
ahttpPort=yyyy
a continuación, reinicie el servicio. debe cambiar la configuración de forma permanente.
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2015-04-28 20:11:22
Con Ubuntu 14.4 he tenido que cambiar el archivo /etc/default/jenkins
Por ejemplo
#HTTP_PORT=8080
HTTP_PORT=8083
Y reiniciar el servicio
service jenkins restart
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2015-03-10 15:48:48
En CentOS / RedHat
Vim/etc/sysconfig / jenkins
# Port Jenkins is listening on.
# Set to -1 to disable
#
JENKINS_PORT="8080"
Cámbielo a cualquier puerto que desee.
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2014-10-23 21:11:54
En Windows (con el Servicio de Windows).
Editar el archivo C:\Program Files (x86)\Jenkins\jenkins.xml
con 8083 si quieres un puerto 8083.
<arguments>-Xrs -Xmx256m -Dhudson.lifecycle=hudson.lifecycle.WindowsServiceLifecycle -jar "%BASE%\jenkins.war" --httpPort=8083</arguments>
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2015-04-28 20:09:28
Para el beneficio de los usuarios de Linux que se encuentran aquí: He encontrado que /etc/sysconfig/jenkins tiene un JENKINS_PORT="8080", que probablemente debería cambiar también.
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2014-08-26 09:32:32
Puedes llamar a
java -jar jenkins.war --help
Para ver una lista de todos los parámetros disponibles.
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2014-10-15 12:51:08
Para Fedora
, RedHat
, CentOS
y al igual, cualquier personalización debe hacerse dentro de /etc/sysconfig/jenkins
en lugar de /etc/init.d/jenkins
. El propósito del primer archivo es exactamente la personalización del segundo archivo.
Así que, dentro de /etc/sysconfig/jenkins
, hay una variable JENKINS_PORT
que contiene el número de puerto en el que Jenkins se está ejecutando.
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2015-02-12 15:44:05
Para cambiar el puerto predeterminado de 8080. Todo lo que necesitas hacer:
- Goto Jenkins carpeta presente en C:\Program Files (x86)
- Abra un bloc de notas o un bloc de texto y ejecútelos como administrador y luego intente abrir jenkins.archivo xml presente en la carpeta jenkins.
- Cambie el número de puerto de la siguiente manera:
<arguments>-Xrs -Xmx256m -Dhudson.lifecycle=hudson.lifecycle.WindowsServiceLifecycle -jar "%BASE%\jenkins.war" --httpPort=9090</arguments>
- Haga clic en Guardar.
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2016-02-23 16:33:49
In * nix En CentOS / RedHat
Vim/etc/sysconfig / jenkins
# Port Jenkins is listening on.
# Set to -1 to disable
#
JENKINS_PORT="8080"
En windows abrir archivo 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>
Ahora tiene que reiniciarlo no funciona a menos que reinicie http://localhost:8080/restart luego, después del reinicio http://localhost:8083 / todo debe estar bien, así que parece que la respuesta anterior que dice que no funciona Tenemos reiniciar.
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2016-03-29 20:10:29
Agregue las siguientes dos líneas después de DAEMON_ARGS en el archivo /etc/init.d/jenkins
HTTP_PORT = 8010
JENKINS_ARGS= "htt httpPort=HTT HTTP_PORT"
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2015-01-28 14:16:40
Correcto, use el parámetro htt httpPort. Si también desea especificar el JEN JENKINS_HOME, puede hacer lo siguiente:
java -DJENKINS_HOME=/Users/Heros/jenkins -jar jenkins.war --httpPort=8484
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2015-05-19 15:20:27
En el archivo de edición OSX:
/usr/local/Cellar/jenkins-lts/2.46.1/homebrew.mxcl.jenkins-lts.plist
Y editar puerto a sus necesidades.
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2017-06-29 13:19:57
Cambie el '/etc/init.d / concha de jenkins
check_tcp_port "http" "$HTTP_PORT" "8080" || return 1
Cambia 8080
a lo que quieras
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2014-07-23 06:42:35