• centos7 安装jenkins


    安装JDK1.8   略

    使用 yum 进行安装jenkins

    #安装自动选择最快源的插件

    [root@vrgv /]# yum install yum-fastestmirror -y

    #安装jenkins最新版本

    [root@vrgv /]# sudo wget -O /etc/yum.repos.d/jenkins.repo http://jenkins-ci.org/redhat/jenkins.repo
    --2020-12-01 14:39:02-- http://jenkins-ci.org/redhat/jenkins.repo
    正在解析主机 jenkins-ci.org (jenkins-ci.org)... 52.167.253.43
    正在连接 jenkins-ci.org (jenkins-ci.org)|52.167.253.43|:80... 已连接。
    已发出 HTTP 请求,正在等待回应... 301 Moved Permanently
    位置:https://www.jenkins.io/redhat/jenkins.repo [跟随至新的 URL]
    --2020-12-01 14:39:02-- https://www.jenkins.io/redhat/jenkins.repo
    正在解析主机 www.jenkins.io (www.jenkins.io)... 151.101.78.133, 2a04:4e42:12::645
    正在连接 www.jenkins.io (www.jenkins.io)|151.101.78.133|:443... 已连接。
    已发出 HTTP 请求,正在等待回应... 301 Moved Permanently
    位置:https://pkg.jenkins.io/redhat/jenkins.repo [跟随至新的 URL]
    --2020-12-01 14:39:49-- https://pkg.jenkins.io/redhat/jenkins.repo
    正在解析主机 pkg.jenkins.io (pkg.jenkins.io)... 151.101.78.133, 2a04:4e42:12::645
    正在连接 pkg.jenkins.io (pkg.jenkins.io)|151.101.78.133|:443... 已连接。
    已发出 HTTP 请求,正在等待回应... 200 OK
    长度:71
    正在保存至: “/etc/yum.repos.d/jenkins.repo”

    100%[================================================================================================================================================================================================>] 71 --.-K/s 用时 0s

    2020-12-01 14:39:49 (1.63 MB/s) - 已保存 “/etc/yum.repos.d/jenkins.repo” [71/71])

    [root@vrgv /]# yum install jenkins
    已加载插件:fastestmirror, product-id, search-disabled-repos, subscription-manager

    This system is not registered with an entitlement server. You can use subscription-manager to register.

    Loading mirror speeds from cached hostfile
    * base: mirrors.aliyun.com
    * epel: d2lzkl7pfhq30w.cloudfront.net
    * extras: mirrors.aliyun.com
    * updates: mirrors.aliyun.com
    正在解决依赖关系
    --> 正在检查事务
    ---> 软件包 jenkins.noarch.0.2.268-1.1 将被 安装
    --> 解决依赖关系完成

    依赖关系解决

    ==========================================================================================================================================================================================================================================
    Package 架构 版本 源 大小
    ==========================================================================================================================================================================================================================================
    正在安装:
    jenkins noarch 2.268-1.1 jenkins 67 M

    事务概要
    ==========================================================================================================================================================================================================================================
    安装 1 软件包

    总计:67 M
    安装大小:68 M
    Is this ok [y/d/N]: y
    Downloading packages:
    警告:/var/cache/yum/x86_64/7/jenkins/packages/jenkins-2.268-1.1.noarch.rpm: 头V4 RSA/SHA512 Signature, 密钥 ID 45f2c3d5: NOKEY


    jenkins-2.268-1.1.noarch.rpm 的公钥尚未安装
    [root@vrgv /]# yum install jenkins -y --nogpgcheck      #由于公钥安装失败,添加--nogpgcheck参数跳过验证公钥
    已加载插件:fastestmirror, product-id, search-disabled-repos, subscription-manager

    This system is not registered with an entitlement server. You can use subscription-manager to register.

    Loading mirror speeds from cached hostfile
    * base: mirrors.aliyun.com
    * epel: d2lzkl7pfhq30w.cloudfront.net
    * extras: mirrors.aliyun.com
    * updates: mirrors.aliyun.com
    正在解决依赖关系
    --> 正在检查事务
    ---> 软件包 jenkins.noarch.0.2.268-1.1 将被 安装
    --> 解决依赖关系完成

    依赖关系解决

    ==========================================================================================================================================================================================================================================
    Package 架构 版本 源 大小
    ==========================================================================================================================================================================================================================================
    正在安装:
    jenkins noarch 2.268-1.1 jenkins 67 M

    事务概要
    ==========================================================================================================================================================================================================================================
    安装 1 软件包

    总计:67 M
    安装大小:68 M
    Downloading packages:
    Running transaction check
    Running transaction test
    Transaction test succeeded
    Running transaction
    正在安装 : jenkins-2.268-1.1.noarch 1/1
    验证中 : jenkins-2.268-1.1.noarch 1/1

    已安装:
    jenkins.noarch 0:2.268-1.1

    完毕!

    #启动jenkins查看启动日志

    [root@vrgv /]# systemctl start jenkins
    [root@vrgv /]# systemctl status jenkins
    ● jenkins.service - LSB: Jenkins Automation Server
       Loaded: loaded (/etc/rc.d/init.d/jenkins; bad; vendor preset: disabled)
       Active: active (running) since 二 2020-12-01 14:42:41 CST; 4s ago
         Docs: man:systemd-sysv-generator(8)
      Process: 39515 ExecStart=/etc/rc.d/init.d/jenkins start (code=exited, status=0/SUCCESS)
       CGroup: /system.slice/jenkins.service
               └─39560 /etc/alternatives/java -Dcom.sun.akuma.Daemon=daemonized -Djava.awt.headless=true -DJENKINS_HOME=/var/lib/jenkins -jar /usr/lib/jenkins/jenkins.war --logfile=/var/log/jenkins/jenkins.log --webroot=/var/cache/jenk...
    
    12月 01 14:42:38 vrgv systemd[1]: Starting LSB: Jenkins Automation Server...
    12月 01 14:42:38 vrgv runuser[39520]: pam_unix(runuser:session): session opened for user jenkins by (uid=0)
    12月 01 14:42:40 vrgv runuser[39520]: pam_unix(runuser:session): session closed for user jenkins
    12月 01 14:42:41 vrgv jenkins[39515]: Starting Jenkins [  确定  ]
    12月 01 14:42:41 vrgv systemd[1]: Started LSB: Jenkins Automation Server.
    [root@vrgv /]# tail -f /var/log/jenkins/jenkins.log
    2020-12-01 06:42:42.353+0000 [id=1]     WARNING winstone.Logger#logInternal: Parameter handlerCountMaxIdle is now deprecated
    2020-12-01 06:42:42.409+0000 [id=1]     INFO    org.eclipse.jetty.util.log.Log#initialized: Logging initialized @1519ms to org.eclipse.jetty.util.log.JavaUtilLog
    2020-12-01 06:42:42.648+0000 [id=1]     INFO    winstone.Logger#logInternal: Beginning extraction from war file
    2020-12-01 06:42:48.995+0000 [id=1]     WARNING o.e.j.s.handler.ContextHandler#setContextPath: Empty contextPath
    2020-12-01 06:42:49.268+0000 [id=1]     INFO    org.eclipse.jetty.server.Server#doStart: jetty-9.4.33.v20201020; built: 2020-10-20T23:39:24.803Z; git: 1be68755656cef678b79a2ef1c2ebbca99e25420; jvm 1.8.0_262-b10
    2020-12-01 06:42:52.262+0000 [id=1]     INFO    o.e.j.w.StandardDescriptorProcessor#visitServlet: NO JSP Support for /, did not find org.eclipse.jetty.jsp.JettyJspServlet
    2020-12-01 06:42:52.781+0000 [id=1]     INFO    o.e.j.s.s.DefaultSessionIdManager#doStart: DefaultSessionIdManager workerName=node0
    2020-12-01 06:42:52.782+0000 [id=1]     INFO    o.e.j.s.s.DefaultSessionIdManager#doStart: No SessionScavenger set, using defaults
    2020-12-01 06:42:52.785+0000 [id=1]     INFO    o.e.j.server.session.HouseKeeper#startScavenging: node0 Scavenging every 660000ms
    2020-12-01 06:42:56.816+0000 [id=1]     INFO    hudson.WebAppMain#contextInitialized: Jenkins home directory: /var/lib/jenkins found at: SystemProperties.getProperty("JENKINS_HOME")
    2020-12-01 06:42:59.333+0000 [id=1]     INFO    o.e.j.s.handler.ContextHandler#doStart: Started w.@88d6f9b{Jenkins v2.268,/,file:///var/cache/jenkins/war/,AVAILABLE}{/var/cache/jenkins/war}
    2020-12-01 06:42:59.541+0000 [id=1]     INFO    o.e.j.server.AbstractConnector#doStart: Started ServerConnector@4bff7da0{HTTP/1.1, (http/1.1)}{0.0.0.0:8080}
    2020-12-01 06:42:59.542+0000 [id=1]     INFO    org.eclipse.jetty.server.Server#doStart: Started @18652ms
    2020-12-01 06:42:59.544+0000 [id=23]    INFO    winstone.Logger#logInternal: Winstone Servlet Engine running: controlPort=disabled
    2020-12-01 06:43:03.395+0000 [id=30]    INFO    jenkins.InitReactorRunner$1#onAttained: Started initialization
    2020-12-01 06:43:03.536+0000 [id=32]    INFO    jenkins.InitReactorRunner$1#onAttained: Listed all plugins
    2020-12-01 06:43:10.651+0000 [id=31]    INFO    jenkins.InitReactorRunner$1#onAttained: Prepared all plugins
    2020-12-01 06:43:10.667+0000 [id=31]    INFO    jenkins.InitReactorRunner$1#onAttained: Started all plugins
    2020-12-01 06:43:10.704+0000 [id=31]    INFO    jenkins.InitReactorRunner$1#onAttained: Augmented all extensions
    2020-12-01 06:43:13.807+0000 [id=34]    INFO    jenkins.InitReactorRunner$1#onAttained: System config loaded
    2020-12-01 06:43:13.808+0000 [id=34]    INFO    jenkins.InitReactorRunner$1#onAttained: System config adapted
    2020-12-01 06:43:13.809+0000 [id=34]    INFO    jenkins.InitReactorRunner$1#onAttained: Loaded all jobs
    2020-12-01 06:43:13.813+0000 [id=34]    INFO    jenkins.InitReactorRunner$1#onAttained: Configuration for all jobs updated
    2020-12-01 06:43:13.962+0000 [id=48]    INFO    hudson.model.AsyncPeriodicWork#lambda$doRun$0: Started Download metadata
    2020-12-01 06:43:13.998+0000 [id=48]    INFO    hudson.util.Retrier#start: Attempt #1 to do the action check updates server
    2020-12-01 06:43:15.227+0000 [id=28]    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:
    
    5455f8745e3e4d77913cb58365d37e5c     ###第一次启动需要验证此密码
    
    This may also be found at: /var/lib/jenkins/secrets/initialAdminPassword

    浏览器输入http://ip:8080即可进入到jenkins界面

    嗨~如果有帮助,请帮忙点个赞吧,谢谢 -致敬每一个正在努力的人
  • 相关阅读:
    使用JFileChooser实现在指定文件夹下批量添加根据“数字型样式”或“非数字型样式”命令的文件夹
    51Nod 1376 最长递增子序列的数量 (DP+BIT)
    POJ 2728 Desert King (最优比率树)
    UVa 11280 Flying to Fredericton (DP + Dijkstra)
    UVa 11367 Full Tank? (DP + Dijkstra)
    UVa 10269 Adventure of Super Mario (Floyd + DP + BFS)
    UVaLive 4452 The Ministers' Major Mess (TwoSat)
    UVa 11294 Wedding (TwoSat)
    HDU 3247 Resource Archiver (AC自动机+BFS+状压DP)
    HDU 5957 Query on a graph (拓扑 + bfs序 + 树剖 + 线段树)
  • 原文地址:https://www.cnblogs.com/dongweizhen/p/14068162.html
Copyright © 2020-2023  润新知