CentOS8:Docker搭建Jenkins2.60.3版本,及更换jenkins下载源
一、CentOS8:Docker搭建Jenkins2.60.3版本
1. 配置jenkins启动命令
启动镜像文件前提:在宿主机配置好jenkins容器挂载地址,防止数据丢失
# 新建jenkins_home2.60.3文件夹
$ mkdir /home/wyt/jenkins_home2.60.3# 设置权限
$ sudo chown -R 1000:1000 /home/wyt/jenkins_home2.60.3
jenkins2.60.3.sh脚本
#! /bin/bash
docker rm -f myjkdocker run --name myjk \
-d -p 8080:8080 \
-p 50000:50000 \
-v /home/wyt/jenkins_home2.60.3:/var/jenkins_home \
--env JAVA_OPTS="-Dhudson.model.DownloadService.noSignatureCheck=true" jenkins# -v /usr/local/apache-maven-3.6.3:/usr/local/apache-maven-3.6.3 \
# -v /usr/local/allure-2.17.2:/usr/local/allure-2.17.2 \
jenkins.sh赋予可执行权限,并启动
$ chmod +x jenkins2.60.3.sh
$ ./jenkins2.60.3.sh
查看密码,并记录下来,下次启动jenkins时使用
$ docker exec -it myjk bashdf825cff514d42798eac55d42ede1f78
打开http://localhost:8080
到下面这步,点【x】
注意:这里是说用户名是admin,密码在/home/wyt/jenkins_home2.60.3/secrets/initialAdminPassword
2. 配置jenkins插件管理
查看对应的版本
https://gitee.com/jenkins-zh/cloudbees-folder-plugin
https://updates.jenkins-ci.org/download/plugins/cloudbees-folder/
下载cloudbees-folder.hpi,注意:版本6.2.1-6.5.1支持jenkins2.60.3
阿里云镜像站 https://mirrors.aliyun.com/jenkins/updates/2.60/
复制update-center.json地址,注意:版本号2.60
上传插件:cloudbees-folder.hpi
更换成阿里的升级站点(注意:一定要点击【提交】
)
https://mirrors.aliyun.com/jenkins/updates/2.60/update-center.json
重启jenkins
$ ./jenkins2.60.3.sh
将刚才的密码写入
进入插件管理,点击【立即获取】
3. 更换jenkins下载源
安装Gitee插件报错
java.io.IOException: Downloaded file /var/jenkins_home/plugins/gitee.jpi.tmp does not match expected SHA-1, expected 'NF8iQWp+h9lro5S4yo+3XGWHJgg=', actual 'w85og1XeUx+Lrwewtk7rDR98BsE='at hudson.model.UpdateCenter.verifyChecksums(UpdateCenter.java:1810)at hudson.model.UpdateCenter.access$1100(UpdateCenter.java:149)at hudson.model.UpdateCenter$InstallationJob.replace(UpdateCenter.java:1963)at hudson.model.UpdateCenter$UpdateCenterConfiguration.install(UpdateCenter.java:1194)at hudson.model.UpdateCenter$DownloadJob._run(UpdateCenter.java:1680)at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:1874)at hudson.model.UpdateCenter$DownloadJob.run(UpdateCenter.java:1651)at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)at java.util.concurrent.FutureTask.run(FutureTask.java:266)at hudson.remoting.AtmostOneThreadExecutor$Worker.run(AtmostOneThreadExecutor.java:110)at java.lang.Thread.run(Thread.java:748)
解决办法:
注意:第1步可以不用做,前面升级站点就是修改的这里
1、修改 jenkins 数据目录中的hudson.model.UpdateCenter.xml值,将https://updates.jenkins.io/update-center.json/更换为阿里云https://mirrors.aliyun.com/jenkins/updates/2.60/update-center.json
sed -i 's/https:\/\/updates.jenkins.io\/update-center.json/https:\/\/mirrors.aliyun.com\/jenkins\/updates\/2.60\/update-center.json/g' /home/wyt/jenkins_home2.60.3/hudson.model.UpdateCenter.xml2、修改updates文件夹中的 default.json文件,将http://updates.jenkins-ci.org/download/更换为阿里云https://mirrors.aliyun.com/jenkins/
sed -i 's/http:\/\/updates.jenkins-ci.org\/download/https:\/\/mirrors.aliyun.com\/jenkins/g' /home/wyt/jenkins_home2.60.3/updates/default.json
sed -i 's/http:\/\/www.google.com/http:\/\/www.baidu.com/g' /home/wyt/jenkins_home2.60.3/updates/default.json3、在浏览器中http:localhost:8080/restart,重启一下Jenkins
- 可以下载自己想要的插件了
遇到问题1
解决办法:
https://blog.csdn.net/DDJ_TEST/article/details/122210331
遇到问题2
java.io.IOException: Downloaded file /var/jenkins_home/plugins/gitee.jpi.tmp does not match expected SHA-1, expected 'NF8iQWp+h9lro5S4yo+3XGWHJgg=', actual 'w85og1XeUx+Lrwewtk7rDR98BsE='at hudson.model.UpdateCenter.verifyChecksums(UpdateCenter.java:1810)at hudson.model.UpdateCenter.access$1100(UpdateCenter.java:149)at hudson.model.UpdateCenter$InstallationJob.replace(UpdateCenter.java:1963)at hudson.model.UpdateCenter$UpdateCenterConfiguration.install(UpdateCenter.java:1194)at hudson.model.UpdateCenter$DownloadJob._run(UpdateCenter.java:1680)at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:1874)at hudson.model.UpdateCenter$DownloadJob.run(UpdateCenter.java:1651)at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)at java.util.concurrent.FutureTask.run(FutureTask.java:266)at hudson.remoting.AtmostOneThreadExecutor$Worker.run(AtmostOneThreadExecutor.java:110)at java.lang.Thread.run(Thread.java:748)
解决办法:
注意:第1步可以不用做,前面升级站点就是修改的这里
1、修改 jenkins 数据目录中的hudson.model.UpdateCenter.xml值,将https://updates.jenkins.io/update-center.json/更换为阿里云https://mirrors.aliyun.com/jenkins/updates/2.60/update-center.json
sed -i 's/https:\/\/updates.jenkins.io\/update-center.json/https:\/\/mirrors.aliyun.com\/jenkins\/updates\/2.60\/update-center.json/g' /home/wyt/jenkins_home2.60.3/hudson.model.UpdateCenter.xml2、修改updates文件夹中的 default.json文件,将http://updates.jenkins-ci.org/download/更换为阿里云https://mirrors.aliyun.com/jenkins/
sed -i 's/http:\/\/updates.jenkins-ci.org\/download/https:\/\/mirrors.aliyun.com\/jenkins/g' /home/wyt/jenkins_home2.60.3/updates/default.json
sed -i 's/http:\/\/www.google.com/http:\/\/www.baidu.com/g' /home/wyt/jenkins_home2.60.3/updates/default.json3、在浏览器中http:localhost:8080/restart,重启一下Jenkins
CentOS8:Docker搭建Jenkins2.60.3版本,及更换jenkins下载源相关推荐
- K8S搭建自动化部署环境(三)Jenkins下载、安装和启动
各位大佬,前文如下: K8S搭建自动化部署环境(一)安装Kubernetes K8S搭建自动化部署环境(二)安装K8S管理工具Kuboard V3 一.jenkins 下载 jenkins下载地址:h ...
- 使用Docker搭建Nextcloud个人工作中心(同步盘+离线下载等功能)以及DNS服务器搭建
目录 前言 需求 选型 环境说明与准备工作 环境 软件准备 Nextcloud本地搭建(Nextcloud+Redis+Mysql) Nextcloud公网访问(可选) 使用同一域名解析至公网或内网I ...
- K8S搭建自动化部署环境(四)Jenkins多分支流水线Blue Ocean的安装和使用
各位大佬,前文如下: K8S搭建自动化部署环境(一)安装Kubernetes K8S搭建自动化部署环境(二)安装K8S管理工具Kuboard V3 K8S搭建自动化部署环境(三)Jenkins下载.安 ...
- 使用Docker搭建ceph群集(nautilus版本)
使用Docker搭建ceph群集(nautilus版本) 一.ceph简介 概述 Ceph是一种为优秀的性能.可靠性和可扩展性而设计的统一的.分布式文件系统.Ceph是一个开源的分布式文件系统.因为它 ...
- 使用docker搭建gitlab版本控制系统
1. GitLab 简介 GitLab 是一款基于 git 的开源代码仓库系统 GitLab 与著名的 GitHub 最大的区别就是: 允许我们搭建自己的 git 代码私有仓库,非常方便 2.安装 ...
- docker image设置jdk版本_使用Docker搭建Java环境的步骤方法
Docker是干什么的 Docker 是一个基于Linux容器(LXC-linux container)的高级容器引擎,基于go语言开发,源代码托管在 Github 上, 遵从Apache2.0协议开 ...
- 群晖docker_利用群晖docker搭建Minecraft服务器:图形界面操作,傻瓜式教程(附官方服务器端地址)_NAS存储...
2020-12-19 18:01:5310点赞57收藏4评论 你是AMD Yes党?还是intel和NVIDIA的忠实簇拥呢?最新一届#装机大师赛#开始啦!本次装机阵营赛分为3A红组.intel NV ...
- docker搭建mysql主从
前言 为什么要使用Docker搭建? 不管是使用源码安装还是离线安装,在服务器上安装一个mysql总会花费不少的时间,而且对于新人来说,中间稍不注意哪一步出错了就导致安装失败,我之前也是安装过2次才成 ...
- VPS服务-Docker搭建个人博客网站
容器安装 本人购买的 VPS 服务器是 Centos 8 操作系统,为了基于 Docker 搭建 WordPress 个人博客网站,首先需要安装 Docker 环境的过程如下: 1.下载 docker ...
最新文章
- 对抗攻击最新研究:仅修改「一个像素」即可骗过神经网络!
- 设计模式重构代码_Duplicated Code (重复代码)如何处理?
- centos利用tar包安装phpmyadmin
- CF1473E Minimum Path(拆点+最短路)
- JAVA_Thread_deadlock
- 固件的完整形式是什么?
- 横跨7个版本的OpenStack无感知热升级在360的落地与实践
- Apple individual program 加入之后的玩法 官方资源
- 32、至少列举8个常用模块都有那些?
- DSP 6678 多核CACHE一致性操作
- adventureworks mysql_AdventureWorks2012
- UE 编辑器无法保存文件(图表被连接到外部包中的私有对象)
- 关于unity,Player打包面板的信息(上)
- 毫米波雷达测距/测速原理介绍_小七自学笔记
- 2022年山东省安全员C证考试资料及山东省安全员C证考试试题
- linux C之srand函数
- 相亲聊什么?想要避免尬聊,就从这6个话题入手
- 五分钟学会前端打包工具webpack
- 1024程序员节获奖名单放榜啦,云端技术奥秘大使就是你!
- few-shot learning个人总结