• Jenkins安装


    Jenkins安装

    官网教程:https://jenkins.io/zh/doc/book/installing/

    • 系统环境:
      • CentOS7.6.1810 (Core) 
      • IP:192.168.137.111
      • 关闭selinux、firewalld
      • jenkins war包:下载地址
    • java环境:java version "1.8.0_202"
    • 安装有两种方式,war包和rpm包

    1. war包安装

    下载war包:

    运行:

    Running from: /tools/jenkins.war
    webroot: $user.home/.jenkins
    Aug 06, 2019 10:31:18 PM org.eclipse.jetty.util.log.Log initialized
    INFO: Logging initialized @433ms to org.eclipse.jetty.util.log.JavaUtilLog
    Aug 06, 2019 10:31:18 PM winstone.Logger logInternal
    INFO: Beginning extraction from war file
    Aug 06, 2019 10:31:18 PM org.eclipse.jetty.server.handler.ContextHandler setContextPath
    WARNING: Empty contextPath
    Aug 06, 2019 10:31:18 PM org.eclipse.jetty.server.Server doStart
    INFO: jetty-9.4.z-SNAPSHOT; built: 2019-02-15T16:53:49.381Z; git: eb70b240169fcf1abbd86af36482d1c49826fa0b; jvm 1.8.0_202-b08
    Aug 06, 2019 10:31:18 PM org.eclipse.jetty.webapp.StandardDescriptorProcessor visitServlet
    INFO: NO JSP Support for /, did not find org.eclipse.jetty.jsp.JettyJspServlet
    Aug 06, 2019 10:31:18 PM org.eclipse.jetty.server.session.DefaultSessionIdManager doStart
    INFO: DefaultSessionIdManager workerName=node0
    Aug 06, 2019 10:31:18 PM org.eclipse.jetty.server.session.DefaultSessionIdManager doStart
    INFO: No SessionScavenger set, using defaults
    Aug 06, 2019 10:31:18 PM org.eclipse.jetty.server.session.HouseKeeper startScavenging
    INFO: node0 Scavenging every 660000ms
    Jenkins home directory: /root/.jenkins found at: $user.home/.jenkins
    Aug 06, 2019 10:31:19 PM org.eclipse.jetty.server.handler.ContextHandler doStart
    INFO: Started w.@508dec2b{Jenkins v2.176.2,/,file:///root/.jenkins/war/,AVAILABLE}{/root/.jenkins/war}
    Aug 06, 2019 10:31:19 PM org.eclipse.jetty.server.AbstractConnector doStart
    INFO: Started ServerConnector@311bf055{HTTP/1.1,[http/1.1]}{0.0.0.0:8080}
    Aug 06, 2019 10:31:19 PM org.eclipse.jetty.server.Server doStart
    INFO: Started @1474ms
    Aug 06, 2019 10:31:19 PM winstone.Logger logInternal
    INFO: Winstone Servlet Engine v4.0 running: controlPort=disabled
    Aug 06, 2019 10:31:20 PM jenkins.InitReactorRunner$1 onAttained
    INFO: Started initialization
    Aug 06, 2019 10:31:20 PM jenkins.InitReactorRunner$1 onAttained
    INFO: Listed all plugins
    Aug 06, 2019 10:31:23 PM jenkins.InitReactorRunner$1 onAttained
    INFO: Prepared all plugins
    Aug 06, 2019 10:31:23 PM jenkins.InitReactorRunner$1 onAttained
    INFO: Started all plugins
    Aug 06, 2019 10:31:23 PM jenkins.InitReactorRunner$1 onAttained
    INFO: Augmented all extensions
    Aug 06, 2019 10:31:24 PM jenkins.InitReactorRunner$1 onAttained
    INFO: Loaded all jobs
    Aug 06, 2019 10:31:24 PM hudson.model.AsyncPeriodicWork$1 run
    INFO: Started Download metadata
    Aug 06, 2019 10:31:24 PM hudson.util.Retrier start
    INFO: Attempt #1 to do the action check updates server
    Aug 06, 2019 10:31:27 PM org.springframework.context.support.AbstractApplicationContext prepareRefresh
    INFO: Refreshing org.springframework.web.context.support.StaticWebApplicationContext@1e48cf8: display name [Root WebApplicationContext]; startup date [Tue Aug 06 22:31:27 CST 2019]; root of context hierarchy
    Aug 06, 2019 10:31:27 PM org.springframework.context.support.AbstractApplicationContext obtainFreshBeanFactory
    INFO: Bean factory for application context [org.springframework.web.context.support.StaticWebApplicationContext@1e48cf8]: org.springframework.beans.factory.support.DefaultListableBeanFactory@52b9cd49
    Aug 06, 2019 10:31:27 PM org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons
    INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@52b9cd49: defining beans [authenticationManager]; root of factory hierarchy
    Aug 06, 2019 10:31:28 PM org.springframework.context.support.AbstractApplicationContext prepareRefresh
    INFO: Refreshing org.springframework.web.context.support.StaticWebApplicationContext@dabec2a: display name [Root WebApplicationContext]; startup date [Tue Aug 06 22:31:28 CST 2019]; root of context hierarchy
    Aug 06, 2019 10:31:28 PM org.springframework.context.support.AbstractApplicationContext obtainFreshBeanFactory
    INFO: Bean factory for application context [org.springframework.web.context.support.StaticWebApplicationContext@dabec2a]: org.springframework.beans.factory.support.DefaultListableBeanFactory@383f7892
    Aug 06, 2019 10:31:28 PM org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons
    INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@383f7892: defining beans [filter,legacy]; root of factory hierarchy
    Aug 06, 2019 10:31:28 PM jenkins.install.SetupWizard init
    INFO: 
    
    *************************************************************
    *************************************************************
    *************************************************************
    
    Jenkins initial setup is required. An admin user has been created and a password generated.
    Please use the following password to proceed to installation:
    
    efe3217c750442a8849e358b511d8e2f
    
    This may also be found at: /root/.jenkins/secrets/initialAdminPassword
    
    *************************************************************
    *************************************************************
    *************************************************************
    
    Aug 06, 2019 10:32:14 PM org.kohsuke.stapler.LocaleDrivenResourceProvider getLocaleDrivenResourceProviders
    INFO: Registered LocaleDrivenResourceProvider: jenkins.MetaLocaleDrivenResourceProvider@bb9fc7c
    Aug 06, 2019 10:32:49 PM hudson.model.UpdateSite updateData
    INFO: Obtained the latest update center data file for UpdateSource default
    Aug 06, 2019 10:32:50 PM jenkins.InitReactorRunner$1 onAttained
    INFO: Completed initialization
    # java -jar jenkins.war

    默认端口是8080,指定端口用命令:

    java -jar jenkins.war --httpPort=9090

    另外,还可以Tomcat跑Jenkins,只需要将war包放到tomcat的根目录(webapps)下,访问即可。(参考博文:https://blog.51cto.com/bigboss/2129358

    2. rpm包安装

     yum方式安装,先配置repo

    # sudo wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo
     
    # sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key
     
    # yum install jenkins –y

    启动:

    # systemctl start Jenkins

    3. Jenkins-web

    浏览器访问,Jenkins的默认端口8080,

    http://192.168.137.111:8080

    按照界面中的提示,在指定位置获取解锁密码(也是安装后分配的admin密码)

    选择推荐安装:

    自动安装过程

     

    创建用户,当让也可以点击右下角admin登录

    保存并完成

    开始使用

     

  • 相关阅读:
    Redis
    Redis
    运维
    Redis
    Redis
    Redis
    Redis
    Redis
    Redis
    Spring
  • 原文地址:https://www.cnblogs.com/-abm/p/11311540.html
Copyright © 2020-2023  润新知