Jenkins

本文介绍了Jenkins这一持续集成工具的简介及其自动化部署的实现原理。通过在Linux环境中下载软件仓库、安装Jenkins及相关依赖,展示了Jenkins的自动化部署流程。然而,在尝试重启服务时遇到了问题,提示需定义$CATALINA_PID。
摘要由CSDN通过智能技术生成

Jenkins

1. jenkins简介

Jenkins是一个开源的、提供友好操作界面的持续集成(CI)工具,起源于Hudson(Hudson是商用的),主要用于持续、自动的构建/测试软件项目、监控外部任务的运行(这个比较抽象,暂且写上,不做解释)。Jenkins用Java语言编写,可在Tomcat等流行的servlet容器中运行,也可独立运行。通常与版本管理工具(SCM)、构建工具结合使用。常用的版本控制工具有SVN、GIT,构建工具有Maven、Ant、Gradle。

2. jenkins自动化部署实现原理

img

3.部署Jenkins

//下载软件仓库
[root@RS1 ~]# yum -y install epel-release
[root@RS1 ~]#  wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo
--2021-10-18 13:00:01--  https://pkg.jenkins.io/redhat-stable/jenkins.repo
正在解析主机 pkg.jenkins.io (pkg.jenkins.io)... 151.101.110.133, 2a04:4e42:11::645
正在连接 pkg.jenkins.io (pkg.jenkins.io)|151.101.110.133|:443... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度:85
正在保存至: “/etc/yum.repos.d/jenkins.repo”

/etc/yum.repos 100%      85  --.-KB/s  用时 0s            

2021-10-18 13:00:02 (7.78 MB/s) - 已保存 “/etc/yum.repos.d/jenkins.repo” [85/85])

[root@RS1 ~]# ls /etc/yum.repos.d/
Centos-8.repo         epel-testing-modular.repo
epel-modular.repo     epel-testing.repo
epel-playground.repo  jenkins.repo
epel.repo             redhat.repo

//下载软件包
[root@RS1 ~]# rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key

//安装依赖包
[root@RS1 ~]# yum install java-11-openjdk-devel
[root@RS1 webapps]# ls
docs      host-manager  manager  test
examples  jenkins.war   ROOT

//重启服务
[root@RS1 webapps]# /usr/local/tomcat/bin/catalina.sh restart 
Using CATALINA_BASE:   /usr/local/tomcat
Using CATALINA_HOME:   /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp
Using JRE_HOME:        /usr
Using CLASSPATH:       /usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar
Using CATALINA_OPTS:   
Usage: catalina.sh ( commands ... )
commands:
  debug             Start Catalina in a debugger
  debug -security   Debug Catalina with a security manager
  jpda start        Start Catalina under JPDA debugger
  run               Start Catalina in the current window
  run -security     Start in the current window with security manager
  start             Start Catalina in a separate window
  start -security   Start in a separate window with security manager
  stop              Stop Catalina, waiting up to 5 seconds for the process to end
  stop n            Stop Catalina, waiting up to n seconds for the process to end
  stop -force       Stop Catalina, wait up to 5 seconds and then use kill -KILL if still running
  stop n -force     Stop Catalina, wait up to n seconds and then use kill -KILL if still running
  configtest        Run a basic syntax check on server.xml - check exit code for result
  version           What version of tomcat are you running?
Note: Waiting for the process to end and use of the -force option require that $CATALINA_PID is defined


 of the -force option require that $CATALINA_PID is defined

在这里插入图片描述

[root@RS1 webapps]# cat /root/.jenkins/secrets/initialAdminPassword
811ea6a76074462db9f827637fa0f0ae

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值