先安装jdk
Jenkins部署方式
官网下载jenkins.war,下载地址http://updates.jenkins-ci.org/download/war/
直接启动
[root@localhost data]# java -jar jenkins.war --httpPort=8080
第一次启动日志输出中包含了默认密码,启动输出
[root@localhost data]# java -jar jenkins.war --httpPort=8080
Running from: /data/jenkins.war
webroot: $user.home/.jenkins
2020-07-06 02:36:52.431+0000 [id=1] INFO org.eclipse.jetty.util.log.Log#initialized: Logging initialized @770ms to org.eclipse.jetty.util.log.JavaUtilLog
2020-07-06 02:36:52.576+0000 [id=1] INFO winstone.Logger#logInternal: Beginning extraction from war file
2020-07-06 02:36:53.908+0000 [id=1] WARNING o.e.j.s.handler.ContextHandler#setContextPath: Empty contextPath
2020-07-06 02:36:53.968+0000 [id=1] INFO org.eclipse.jetty.server.Server#doStart: jetty-9.4.30.v20200611; built: 2020-06-11T12:34:51.929Z; git: 271836e4c1f4612f12b7bb13ef5a92a927634b0d; jvm 1.8.0_252-b09
2020-07-06 02:36:54.636+0000 [id=1] INFO o.e.j.w.StandardDescriptorProcessor#visitServlet: NO JSP Support for /, did not find org.eclipse.jetty.jsp.JettyJspServlet
2020-07-06 02:36:54.724+0000 [id=1] INFO o.e.j.s.s.DefaultSessionIdManager#doStart: DefaultSessionIdManager workerName=node0
2020-07-06 02:36:54.724+0000 [id=1] INFO o.e.j.s.s.DefaultSessionIdManager#doStart: No SessionScavenger set, using defaults
2020-07-06 02:36:54.727+0000 [id=1] INFO o.e.j.server.session.HouseKeeper#startScavenging: node0 Scavenging every 600000ms
2020-07-06 02:36:55.154+0000 [id=1] INFO hudson.WebAppMain#contextInitialized: Jenkins home directory: /root/.jenkins found at: $user.home/.jenkins
2020-07-06 02:36:56.281+0000 [id=1] INFO o.e.j.s.handler.ContextHandler#doStart: Started w.@aa22f1c{Jenkins v2.243,/,file:///root/.jenkins/war/,AVAILABLE}{/root/.jenkins/war}
2020-07-06 02:36:56.332+0000 [id=1] INFO o.e.j.server.AbstractConnector#doStart: Started ServerConnector@7139992f{HTTP/1.1, (http/1.1)}{0.0.0.0:8080}
2020-07-06 02:36:56.332+0000 [id=1] INFO org.eclipse.jetty.server.Server#doStart: Started @4672ms
2020-07-06 02:36:56.333+0000 [id=21] INFO winstone.Logger#logInternal: Winstone Servlet Engine running: controlPort=disabled
2020-07-06 02:36:57.731+0000 [id=28] INFO jenkins.InitReactorRunner$1#onAttained: Started initialization
2020-07-06 02:36:57.774+0000 [id=26] INFO jenkins.InitReactorRunner$1#onAttained: Listed all plugins
2020-07-06 02:36:58.860+0000 [id=27] INFO jenkins.InitReactorRunner$1#onAttained: Prepared all plugins
2020-07-06 02:36:58.865+0000 [id=27] INFO jenkins.InitReactorRunner$1#onAttained: Started all plugins
2020-07-06 02:36:58.873+0000 [id=30] INFO jenkins.InitReactorRunner$1#onAttained: Augmented all extensions
2020-07-06 02:36:59.288+0000 [id=29] INFO jenkins.InitReactorRunner$1#onAttained: System config loaded
2020-07-06 02:36:59.288+0000 [id=29] INFO jenkins.InitReactorRunner$1#onAttained: System config adapted
2020-07-06 02:36:59.288+0000 [id=29] INFO jenkins.InitReactorRunner$1#onAttained: Loaded all jobs
2020-07-06 02:36:59.291+0000 [id=31] INFO jenkins.InitReactorRunner$1#onAttained: Configuration for all jobs updated
2020-07-06 02:36:59.320+0000 [id=45] INFO hudson.model.AsyncPeriodicWork#lambda$doRun$0: Started Download metadata
2020-07-06 02:36:59.346+0000 [id=45] INFO hudson.util.Retrier#start: Attempt #1 to do the action check updates server
2020-07-06 02:37:00.231+0000 [id=31] INFO o.s.c.s.AbstractApplicationContext#prepareRefresh: Refreshing org.springframework.web.context.support.StaticWebApplicationContext@7a2f59a6: display name [Root WebApplicationContext]; startup date [Mon Jul 06 10:37:00 CST 2020]; root of context hierarchy
2020-07-06 02:37:00.232+0000 [id=31] INFO o.s.c.s.AbstractApplicationContext#obtainFreshBeanFactory: Bean factory for application context [org.springframework.web.context.support.StaticWebApplicationContext@7a2f59a6]: org.springframework.beans.factory.support.DefaultListableBeanFactory@2b6a218d
2020-07-06 02:37:00.241+0000 [id=31] INFO o.s.b.f.s.DefaultListableBeanFactory#preInstantiateSingletons: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@2b6a218d: defining beans [authenticationManager]; root of factory hierarchy
2020-07-06 02:37:00.388+0000 [id=31] INFO o.s.c.s.AbstractApplicationContext#prepareRefresh: Refreshing org.springframework.web.context.support.StaticWebApplicationContext@5f33da06: display name [Root WebApplicationContext]; startup date [Mon Jul 06 10:37:00 CST 2020]; root of context hierarchy
2020-07-06 02:37:00.388+0000 [id=31] INFO o.s.c.s.AbstractApplicationContext#obtainFreshBeanFactory: Bean factory for application context [org.springframework.web.context.support.StaticWebApplicationContext@5f33da06]: org.springframework.beans.factory.support.DefaultListableBeanFactory@6b1e5ad
2020-07-06 02:37:00.389+0000 [id=31] INFO o.s.b.f.s.DefaultListableBeanFactory#preInstantiateSingletons: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@6b1e5ad: defining beans [filter,legacy]; root of factory hierarchy
2020-07-06 02:37:00.607+0000 [id=31] INFO jenkins.install.SetupWizard#init:
*************************************************************
*************************************************************
*************************************************************
Jenkins initial setup is required. An admin user has been created and a password generated.
Please use the following password to proceed to installation:
d66467cee0c64390bf9c55331f5685ab
This may also be found at: /root/.jenkins/secrets/initialAdminPassword
*************************************************************
*************************************************************
*************************************************************
2020-07-06 02:3:35.062+0000 [id=45] INFO h.m.DownloadService$Downloadable#load: Obtained the updated data file for hudson.tasks.Maven.MavenInstaller
2020-07-06 02:37:35.063+0000 [id=45] INFO hudson.util.Retrier#start: Performed the action check updates server successfully at the attempt #1
2020-07-06 02:37:35.065+0000 [id=45] INFO hudson.model.AsyncPeriodicWork#lambda$doRun$0: Finished Download metadata. 35,741 ms
2020-07-06 02:37:35.091+0000 [id=31] INFO jenkins.InitReactorRunner$1#onAttained: Completed initialization
2020-07-06 02:37:35.101+0000 [id=20] INFO hudson.WebAppMain$3#run: Jenkins is fully up and running
如果要在后台运行,关闭控制台还能运行,则启动命令改为:
[root@localhost data]# nohup java -jar jenkins.war --httpPort=8080 &