【Jenkins】windows安装步骤

【Jenkins】windows安装步骤

  • 官网
  • 使用WAR包方式运行
  • 浏览器访问Jenkins
  • windows-installer安装
  • 安装过程问题解决
    • This account either does not hava the privilege to logon as a service or the account was unable to be verified
  • 安装成功
  • 修改jenkins.xml
  • 启动jenkins
  • 访问jenkins
  • 安装插件
    • 离线安装插件
  • 常用插件
  • 常用Jenkins页面

官网

  • 官网: https://www.jenkins.io/
  • windows下载地址: https://www.jenkins.io/download/thank-you-downloading-windows-installer/
  • 通用包下载,点击Generic Java package (.war):
    • https://mirrors.tuna.tsinghua.edu.cn/jenkins/war-stable/2.387.1/jenkins.war
    • https://mirror.twds.com.tw/jenkins/war-stable/2.462.3/jenkins.war
  • Jenkins安装软硬件要求: https://www.jenkins.io/doc/book/installing/linux/#prerequisites
    • Java版本要求: https://www.jenkins.io/doc/book/platform-information/support-policy-java/
  • 官方用户指南: https://www.jenkins.io/doc/
  • jenkins.io如果官网访问不了,尝试修改DNS114.114.114.1148.8.8.8

使用WAR包方式运行

  • 新建一个安装目录,例如D:\ProgramFiles\Jenkins
  • jenkins.war复制到安装目录
  • 新建环境变量: JENKINS_HOME=D:\ProgramFiles\Jenkins
    在这里插入图片描述

    解压的war包默认是放在C盘的用户目录,通过JENKINS_HOME环境变量可以快捷指定解压的WAR包路径、插件路径、日志路径等

  • 查看帮助: java -jar jenkins.war --help
Microsoft Windows [版本 10.0.22631.4317]
(c) Microsoft Corporation。保留所有权利。D:\ProgramFiles\Jenkins>java -jar jenkins.war --help
Running from: D:\ProgramFiles\Jenkins\jenkins.war
webroot: D:\ProgramFiles\Jenkins\war
Jenkins Automation Server Engine 2.462.3
Usage: java -jar jenkins.war [--option=value] [--option=value]Options:--webroot                = folder where the WAR file is expanded into. Default is ${JENKINS_HOME}/war--pluginroot             = folder where the plugin archives are expanded into. Default is ${JENKINS_HOME}/plugins(NOTE: this option does not change the directory where the plugin archives are stored)--extractedFilesFolder   = folder where extracted files are to be located. Default is the temp folder--enable-future-java     = allows running with Java versions which are not fully supported--paramsFromStdIn        = Read parameters from standard input (stdin)--version                = Print version to standard output (stdout) and exit--javaHome               = Override the JAVA_HOME variable--config                 = load configuration properties from here. Default is ./winstone.properties--prefix                 = add this prefix to all URLs (eg http://localhost:8080/prefix/resource). Default is none--commonLibFolder        = folder for additional jar files. Default is ./lib--logfile                = redirect log messages to this file--logThrowingLineNo      = show the line no that logged the message (slow). Default is false--logThrowingThread      = show the thread that logged the message. Default is false--debug                  = set the level of Winstone debug msgs (1-9). Default is 5 (INFO level)--httpPort               = set the http listening port. -1 to disable, Default is 8080--httpListenAddress      = set the http listening address. Default is all interfaces--httpUnixDomainPath     = set the http unix domain path. Default is no path--httpKeepAliveTimeout   = how long idle HTTP keep-alive connections are kept around (in ms; default 30000)?--httpsPort              = set the https listening port. -1 to disable, Default is disabled--httpsListenAddress     = set the https listening address. Default is all interfaces--httpsKeepAliveTimeout  = how long idle HTTPS keep-alive connections are kept around (in ms; default 30000)?--httpsKeyStore          = the location of the SSL KeyStore file. Default is ./winstone.ks--httpsKeyStorePassword  = the password for the SSL KeyStore file. Default is null--httpsKeyManagerType    = the SSL KeyManagerFactory type (eg SunX509, IbmX509). Default is SunX509--httpsRedirectHttp      = redirect http requests to https (requires both --httpPort and --httpsPort)--http2Port              = set the http2 listening port. -1 to disable, Default is disabled--httpsSniHostCheck      = if the SNI Host name must match when there is an SNI certificate. Check disabled per default--httpsSniRequired       = if a SNI certificate is required. Disabled per default--http2ListenAddress     = set the http2 listening address. Default is all interfaces--httpsVerifyClient      = if the client needs a certificate. Can be true (clients always needs a certificate),optional or false.--excludeProtocols       = set protocol versions to exclude. (comma separated list, use blank quote " " to exclude none)(default is "SSL", "SSLv2", "SSLv2Hello", "SSLv3")--excludeCipherSuites    = set the ciphers to exclude (comma separated, use blank quote " " to exclude none) (default is// Exclude weak / insecure ciphers"^.*_(MD5|SHA|SHA1)$",// Exclude ciphers that don't support forward secrecy"^TLS_RSA_.*$",// The following exclusions are present to cleanup known bad cipher// suites that may be accidentally included via include patterns.// The default enabled cipher list in Java will not include these// (but they are available in the supported list)."^SSL_.*$","^.*_NULL_.*$","^.*_anon_.*$"--controlPort            = set the shutdown/control port. -1 to disable, Default disabled--compression            = set the compression scheme (gzip or none to disable compression). Default is gzip.--sessionTimeout         = set the http session timeout value in minutes. Default to what webapp specifies, and then to 60 minutes--sessionEviction        = set the session eviction timeout for idle sessions in seconds. Default value is 180. -1 never evict, 0 evict on exit--mimeTypes=ARG          = define additional MIME type mappings. ARG would be EXT=MIMETYPE:EXT=MIMETYPE:...(e.g., xls=application/vnd.ms-excel:wmf=application/x-msmetafile)--requestHeaderSize=N    = set the maximum size in bytes of the request header. Default is 8192.--responseHeaderSize=N    = set the maximum size in bytes of the response header. Default is 8192.--maxParamCount=N        = set the max number of parameters allowed in a form submission to protectagainst hash DoS attack (oCERT #2011-003). Default is 10000.--useJmx                 = Enable Jetty Jmx--qtpMaxThreadsCount     = max threads number when using Jetty Queued Thread Pool--jettyAcceptorsCount    = Jetty Acceptors number--jettySelectorsCount    = Jetty Selectors number--usage / --help         = show this messageSecurity options:--realmClassName               = Set the realm class to use for user authentication. Defaults to ArgumentsRealm class--argumentsRealm.passwd.<user> = Password for user <user>. Only valid for the ArgumentsRealm realm class--argumentsRealm.roles.<user>  = Roles for user <user> (comma separated). Only valid for the ArgumentsRealm realm class--fileRealm.configFile         = File containing users/passwds/roles. Only valid for the FileRealm realm classAccess logging:--accessLoggerClassName        = Set the access logger class to use for user authentication. Defaults to disabled--simpleAccessLogger.format    = The log format to use. Supports combined/common/resin/custom (SimpleAccessLogger only)--simpleAccessLogger.file      = The location pattern for the log file(SimpleAccessLogger only)
  • 指定端口启动Jenkins: java -jar jenkins.war --httpPort=8890
D:\ProgramFiles\Jenkins>java -jar jenkins.war --httpPort=8890
Running from: D:\ProgramFiles\Jenkins\jenkins.war
webroot: D:\ProgramFiles\Jenkins\war
2024-10-11 01:27:24.897+0000 [id=1]     INFO    winstone.Logger#logInternal: Beginning extraction from war file
2024-10-11 01:27:25.753+0000 [id=1]     WARNING o.e.j.s.handler.ContextHandler#setContextPath: Empty contextPath
2024-10-11 01:27:25.813+0000 [id=1]     INFO    org.eclipse.jetty.server.Server#doStart: jetty-10.0.24; built: 2024-08-26T17:58:21.070Z; git: d5384207795da96fad32db8ea8d26b69955bcc03; jvm 21+35-2513
2024-10-11 01:27:32.225+0000 [id=1]     INFO    o.e.j.w.StandardDescriptorProcessor#visitServlet: NO JSP Support for /, did not find org.eclipse.jetty.jsp.JettyJspServlet
2024-10-11 01:27:32.276+0000 [id=1]     INFO    o.e.j.s.s.DefaultSessionIdManager#doStart: Session workerName=node0
2024-10-11 01:27:33.699+0000 [id=1]     INFO    hudson.WebAppMain#contextInitialized: Jenkins home directory: D:\ProgramFiles\Jenkins found at: EnvVars.masterEnvVars.get("JENKINS_HOME")
2024-10-11 01:27:34.326+0000 [id=1]     INFO    o.e.j.s.handler.ContextHandler#doStart: Started w.@7ea08277{Jenkins v2.462.3,/,file:///D:/ProgramFiles/Jenkins/war/,AVAILABLE}{D:\ProgramFiles\Jenkins\war}
2024-10-11 01:27:34.451+0000 [id=1]     INFO    o.e.j.server.AbstractConnector#doStart: Started ServerConnector@2e48362c{HTTP/1.1, (http/1.1)}{0.0.0.0:8890}
2024-10-11 01:27:34.796+0000 [id=1]     INFO    org.eclipse.jetty.server.Server#doStart: Started Server@14fc1f0{STARTING}[10.0.24,sto=0] @10278ms
2024-10-11 01:27:34.796+0000 [id=69]    INFO    winstone.Logger#logInternal: Winstone Servlet Engine running: controlPort=disabled
2024-10-11 01:27:34.952+0000 [id=78]    INFO    jenkins.InitReactorRunner$1#onAttained: Started initialization
2024-10-11 01:27:34.999+0000 [id=98]    INFO    jenkins.InitReactorRunner$1#onAttained: Listed all plugins
2024-10-11 01:27:37.490+0000 [id=106]   INFO    jenkins.InitReactorRunner$1#onAttained: Prepared all plugins
2024-10-11 01:27:37.521+0000 [id=116]   INFO    jenkins.InitReactorRunner$1#onAttained: Started all plugins
2024-10-11 01:27:37.540+0000 [id=119]   INFO    jenkins.InitReactorRunner$1#onAttained: Augmented all extensions
2024-10-11 01:27:38.148+0000 [id=119]   INFO    jenkins.InitReactorRunner$1#onAttained: System config loaded
2024-10-11 01:27:38.148+0000 [id=119]   INFO    jenkins.InitReactorRunner$1#onAttained: System config adapted
2024-10-11 01:27:38.148+0000 [id=92]    INFO    jenkins.InitReactorRunner$1#onAttained: Loaded all jobs
2024-10-11 01:27:38.163+0000 [id=92]    INFO    jenkins.InitReactorRunner$1#onAttained: Configuration for all jobs updated
2024-10-11 01:27:38.226+0000 [id=136]   INFO    hudson.util.Retrier#start: Attempt #1 to do the action check updates server
2024-10-11 01:27:39.150+0000 [id=107]   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:562cc0d6bc444f299ef44f79460f4589This may also be found at: D:\ProgramFiles\Jenkins\secrets\initialAdminPassword*************************************************************
*************************************************************
*************************************************************2024-10-11 01:27:47.879+0000 [id=136]   INFO    h.m.DownloadService$Downloadable#load: Obtained the updated data file for hudson.tasks.Maven.MavenInstaller
2024-10-11 01:27:47.879+0000 [id=136]   INFO    hudson.util.Retrier#start: Performed the action check updates server successfully at the attempt #1
2024-10-11 01:27:51.060+0000 [id=107]   INFO    jenkins.InitReactorRunner$1#onAttained: Completed initialization
2024-10-11 01:27:51.060+0000 [id=58]    INFO    hudson.lifecycle.Lifecycle#onReady: Jenkins is fully up and running

Jenkins第一次启动,会在控制台打印管理员初始化密码,比如562cc0d6bc444f299ef44f79460f4589,同时jenkins目录下也生成了很多个文件夹
在这里插入图片描述

浏览器访问Jenkins

  • 访问http://localhost:8890
    在这里插入图片描述
  • 输入密码562cc0d6bc444f299ef44f79460f4589,进入jenkins首页

    如果忘记了或找不到启动时的初始密码,可以从这个位置查看初始密码: D:\ProgramFiles\Jenkins\secrets\initialAdminPassword

  • 选哪个都可以,我一般会选择选择插件来安装,可以看看默认勾选的是哪些插件
    在这里插入图片描述
  • 根据需要勾选插件,然后点右下角的安装
    在这里插入图片描述
  • 接下来就是等待Jenkins下载和安装上一步勾选的插件
    在这里插入图片描述
  • 安装完插件后,会进入下一个页面,创建管理员账号
    在这里插入图片描述

    也可以不创建用户,直接点击使用admin账户继续

  • 配置Jenkins访问地址

    在这里插入图片描述

  • 这样就完成了Jenkins的基本配置

    在这里插入图片描述

  • 成功进入Jenkins首页

    在这里插入图片描述

windows-installer安装

除了WAR包方式,windows还可以下载installer安装程序进行安装

安装过程问题解决

This account either does not hava the privilege to logon as a service or the account was unable to be verified

在这里插入图片描述

  • 如果出现这个错误提示,则参考资料: https://blog.csdn.net/wuxiaoying888/article/details/124457546
  • 命令行输入secpol.msc打开本地安全策略
  • 本地策略 --> 用户权限分配 --> 作为服务登录 --> 添加当前登录用户

安装成功

会在windows服务列表中新增一个Jenkins服务

修改jenkins.xml

  • <env name="JENKINS_HOME" value="D:\ProgramFiles\Jenkins\.jenkins"/>
  • <arguments>-Xrs -Xmx256m -Dhudson.lifecycle=hudson.lifecycle.WindowsServiceLifecycle -jar "D:\ProgramFiles\Jenkins\jenkins.war" --httpPort=8080 --webroot="D:\ProgramFiles\Jenkins\war"</arguments>
  • <pidfile>D:\ProgramFiles\Jenkins\jenkins.pid</pidfile>

启动jenkins

net start Jenkins

访问jenkins

  • 在浏览器输入http://localhost:8080
    在这里插入图片描述
  • 打开D:\ProgramFiles\Jenkins\.jenkins\secrets\initialAdminPassword复制初始化密码
  • 安装社区推荐的插件
    在这里插入图片描述
    • Folders
    • OWASP Markup Formatter
    • Build Timeout
    • Credentials Binding
    • Timestamper
    • Workspace Cleanup
    • Ant
    • Gradle
    • Pipeline
    • GitHub Branch Source
    • Pipeline: GitHub Groovy Libraries
    • Pipeline: Stage View
    • Git
    • SSH Build Agents
    • Matrix Authorization Strategy
    • PAM Authentication
    • LDAP
    • Email Extension
    • Mailer
    • Localization: Chinese (Simplified)
  • 跳过
    在这里插入图片描述

安装插件

离线安装插件

  • D:\ProgramFiles\Jenkins\.jenkins\plugins直接将jpi放入Jenkinsplugins文件夹下,然后重启Jenkins即可
  • 重启Jenkins,在浏览器输入http://localhost:8080/restart

常用插件

  • Git: https://plugins.jenkins.io/git/#releases
  • Subversion: https://plugins.jenkins.io/subversion/#releases
  • Gitee: https://plugins.jenkins.io/gitee/#releases
  • Pipeline: https://plugins.jenkins.io/workflow-aggregator/#releases
    Pipeline还依赖下面这几个插件
    • Pipeline: Stage View
    • Pipeline: Nodes and Processes
    • Pipeline: Basic Steps
  • Localization: Chinese (Simplified)
  • Publish Over SSH: https://plugins.jenkins.io/publish-over-ssh/#releases

常用Jenkins页面

  • Jenkins环境变量: http://localhost:8080/env-vars.html/
  • 全局变量: http://localhost:8080/job/ssh-test/pipeline-syntax/globals
  • Pipeline语法生成器: http://localhost:8080/job/ssh-test/pipeline-syntax/

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/web/55734.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

springboot030甘肃非物质文化网站的设计与开发(论文+源码)_kaic

毕 业 设 计&#xff08;论 文&#xff09; 题目&#xff1a;甘肃非物质文化网站设计与实现 摘 要 现代经济快节奏发展以及不断完善升级的信息化技术&#xff0c;让传统数据信息的管理升级为软件存储&#xff0c;归纳&#xff0c;集中处理数据信息的管理方式。本甘肃非物质文化…

Java基于SSM框架的教学辅助微信小程序【附源码、文档】

博主介绍&#xff1a;✌IT徐师兄、7年大厂程序员经历。全网粉丝15W、csdn博客专家、掘金/华为云//InfoQ等平台优质作者、专注于Java技术领域和毕业项目实战✌ &#x1f345;文末获取源码联系&#x1f345; &#x1f447;&#x1f3fb; 精彩专栏推荐订阅&#x1f447;&#x1f3…

JDK 1.5主要特性

JDK 1.5&#xff0c;也被称为Java 5.0或Java 2 Platform, Standard Edition 5.0&#xff0c;是Java编程语言的第五个主要版本&#xff0c;由Sun Microsystems公司在2004年发布。JDK 1.5是Java语言发展中的一个重要里程碑&#xff0c;它引入了许多创新特性和改进&#xff0c;对J…

vim实用笔记

函数跳转功能 想要使用函数跳转功能需要先安装 ctags sudo apt-get install exuberant-ctags接着&#xff0c;在源文件目录树执行如下命令&#xff1a; ctags -R . 即可在该目录下生成一个tags文件&#xff0c; 这个文件就是所有函数和变量的索引 接着打开用vim打开任一文件…

BinAbsInspector部署、使用与原理分析

文章目录 前言1、概述2、安装与使用2.1、源码安装2.1.1、部署系统依赖组件2.1.1.1、部署基础依赖组件2.1.1.2、部署Ghidra 11.0.32.1.1.2.1、部署JDK 172.1.1.2.2、部署Gradle 7.4.22.1.1.2.3、部署Ghidra 11.0.3 2.1.1.3、部署Z3 4.8.15 2.1.2、使用源码安装系统 2.2、使用方法…

CMake 教程(二)添加库

目录 一、实例一——创建库1、add_library2、target_include_directories()、target_link_libraries()2.1 target_include_directories()2.2 target_link_libraries() 3、实例操作 二、实例二——添加选项1、option()2、实例操作 在第一节 CMake 教程&#xff08;一&#xff09…

go语言编写SSH远程登录并执行命令的程序

在Go语言中&#xff0c;你可以使用golang.org/x/crypto/ssh包来编写一个SSH远程登录并执行命令的程序。以下是一个简单的示例&#xff0c;展示了如何使用该包来实现这个功能&#xff1a; 首先&#xff0c;你需要安装golang.org/x/crypto/ssh包&#xff08;如果还没有安装的话&…

学习笔记(202410)

课程&#xff1a;Generative AI for Software Development 链接&#xff1a;吴恩达同步最新AI专业课&#xff0c;第54讲&#xff1a;用人工智能做软件开发--Generative AI for Software Development_哔哩哔哩_bilibili 时间&#xff1a;2024-10-12 至 概述&#xff1a;使用C…

ES-入门-javaApi-文档-新增-删除

新增指定索引的文档数据的代码如下&#xff1a; package com.atgulgu.es.test;import com.fasterxml.jackson.databind.ObjectMapper; import org.apache.http.HttpHost; import org.elasticsearch.action.index.IndexRequest; import org.elasticsearch.action.index.IndexRe…

学习笔记——交换——STP(生成树)简介

一、技术背景 1、生成树技术背景 交换机单线路组网&#xff0c;存在单点故障(上左图)&#xff0c;上行线路及设备都不具备冗余性&#xff0c;一旦链路或上行设备发生故障&#xff0c;业务将会中断。 为了使得网络更加健壮、更具有冗余性&#xff0c;将拓扑修改为(上右图)接入…

网络学习笔记

一、网络的结构与功能 网络的鲁棒性与抗毁性 如果在移走少量节点后网络中的绝大部分节点仍然是连通的&#xff0c;那么就该网络的连通性对节点故障具有鲁棒性 网络上的动力学 动力系统&#xff1a;自旋、振子或混沌的同步、可激发系统 传播过程&#xff1a;信息传播与拥堵…

Linux 命令 —— grep、tail、head、cat、more、less(查看日志常用命令)

文章目录 查看日志常用命令grep 命令tail 命令head 命令cat 命令more 命令less 命令 查看日志常用命令 grep tail、head、cat、more、less grep 命令 grep [options] PATTERN filename&#xff1a;查找日志文件中的 PATTERN 关键字&#xff0c;用于过滤/搜索的特定字符。PAT…

ChatGPT01-preivew体验报告:内置思维链和多个llm组合出的COT有啥区别呢?丹田与练气+中学生物理奥赛题测试,名不虚传还是名副其实?

一个月前&#xff0c;o1发布的时候&#xff0c;我写了篇文章介绍 逻辑推理能力堪比博士生&#xff0c;OpenAI发布全新AI模型系列&#xff1a; o1 - 大模型或许进入新阶段&#xff0c;还翻译了官方的介绍 解密OpenAI o1是如何让LLMs获得逻辑推理能力的 - CoT * RL&#xff0c;也…

代码复现(五):GCPANet

文章目录 net.py1.class Bottleneck&#xff1a;残差块2.class ResNet&#xff1a;特征提取3.class SRM&#xff1a;SR模块4.class FAM&#xff1a;FIA模块5.class CA&#xff1a;GCF模块6.class SA&#xff1a;HA模块7.class GCPANet&#xff1a;网络架构 train.pytest.py 论文…

快速上手C语言【下】(非常详细!!!)

目录 1. 指针 1.1 指针是什么 1.2 指针类型 1.2.1 指针-整数 1.2.2 指针解引用 1.3 const修饰 1.4 字符指针 1.5 指针-指针 1.6 二级指针 2. 数组 2.1 定义和初始化 2.2 下标引用操作符[ ] 2.3 二维数组 2.4 终极测试 3. 函数 3.1 声明和定义 3.2 传值调用…

【Python爬虫实战】深入解析BeautifulSoup4的强大功能与用法

&#x1f308;个人主页&#xff1a;https://blog.csdn.net/2401_86688088?typeblog &#x1f525; 系列专栏&#xff1a;https://blog.csdn.net/2401_86688088/category_12797772.html 目录 前言 一、BeautifulSoup4的介绍和安装 &#xff08;一&#xff09;基本功能和特点…

efinance库支持哪些类型的金融数据获取?

炒股自动化&#xff1a;申请官方API接口&#xff0c;散户也可以 python炒股自动化&#xff08;0&#xff09;&#xff0c;申请券商API接口 python炒股自动化&#xff08;1&#xff09;&#xff0c;量化交易接口区别 Python炒股自动化&#xff08;2&#xff09;&#xff1a;获取…

Servlet[springmvc]的Servlet.init()引发异常

报错&#xff1a; 原因之一&#xff1a; web.xml配置文件中监听器导入依赖项错误

window自定义事件与触发

一、API document.createEvent("HTMLEvents").initEvent("名称", true, true);window.addEventListener window.dispatchEvent 二、主流浏览器 流程五步&#xff1a; // 1.创建一个event对象实例 var event document.createEvent("HTMLEvents&quo…

【无标题】VUE入门如何创建一个vue项目

二.如何新建一个Vue项目 我们可以通过俩种方式新建一个Vue项目&#xff1a; 命令行 图形化界面 1.使用命令行新建Vue项目 首先&#xff0c;我们在任意位置新建一个文件夹&#xff0c;名字随意 然后双击进入这个文件夹&#xff0c;并且在上方路径中输入 cmd 打开控制面板 …