1
0

Site updated: 2020-02-21 16:28:52

This commit is contained in:
davidz 2020-02-21 16:28:53 +08:00
parent 435851f48c
commit d4bcd61c22
21 changed files with 809 additions and 51 deletions

View File

@ -533,7 +533,7 @@ $$</p>
</dl>
</div>
<ul>
<li><a href="/">8 <p>文章</p></a></li>
<li><a href="/">9 <p>文章</p></a></li>
<li><a href="/categories">5 <p>分类</p></a></li>
<li><a href="/tags">11 <p>标签</p></a></li>
</ul>

View File

@ -60,7 +60,7 @@
<div class="content animated fadeIn">
<div class="set">
<h1 style="text-align: center">归档</h1>
<p style="text-align: center">8</p>
<p style="text-align: center">9</p>
<ul class="timeline timeline-centered">
@ -73,6 +73,25 @@
</div>
</li>
<li class="timeline-item">
<div class="timeline-info">
<span class="gradient-text">二月 21, 2020</span>
</div>
<div class="timeline-marker"></div>
<div class="timeline-content">
<a class="timeline-title" target="_self" href="/jenkins-update-solution-inside-gfw/">墙内 Jenkins 插件下载的一种解决方案</a>
<p>
¶前言
闲来无聊,在家折腾 DevOps第一步当然是部署一个 Jenkins 啦,然而一顿操作猛如虎,插件一个都下载不下来,总不能给 Jenkins 加个代理吧,所以有了下面这一通折腾。
¶原因
根据经验,国外这些软件下载失败基本上都是因为链接不上服务器,换个源就好了。所以简单百度,找到大量相关教程,换了清华源在内的四五个国内的源,均无效。
这就非常奇怪了所以我打开了清华源的updat...
</p>
</div>
</li>
<li class="timeline-item">
<div class="timeline-info">
<span class="gradient-text">二月 12, 2020</span>

View File

@ -60,7 +60,7 @@
<div class="content animated fadeIn">
<div class="set">
<h1 style="text-align: center">归档</h1>
<p style="text-align: center">8</p>
<p style="text-align: center">9</p>
<ul class="timeline timeline-centered">
@ -73,6 +73,25 @@
</div>
</li>
<li class="timeline-item">
<div class="timeline-info">
<span class="gradient-text">二月 21, 2020</span>
</div>
<div class="timeline-marker"></div>
<div class="timeline-content">
<a class="timeline-title" target="_self" href="/jenkins-update-solution-inside-gfw/">墙内 Jenkins 插件下载的一种解决方案</a>
<p>
¶前言
闲来无聊,在家折腾 DevOps第一步当然是部署一个 Jenkins 啦,然而一顿操作猛如虎,插件一个都下载不下来,总不能给 Jenkins 加个代理吧,所以有了下面这一通折腾。
¶原因
根据经验,国外这些软件下载失败基本上都是因为链接不上服务器,换个源就好了。所以简单百度,找到大量相关教程,换了清华源在内的四五个国内的源,均无效。
这就非常奇怪了所以我打开了清华源的updat...
</p>
</div>
</li>
<li class="timeline-item">
<div class="timeline-info">
<span class="gradient-text">二月 12, 2020</span>

View File

@ -60,7 +60,7 @@
<div class="content animated fadeIn">
<div class="set">
<h1 style="text-align: center">归档</h1>
<p style="text-align: center">8</p>
<p style="text-align: center">9</p>
<ul class="timeline timeline-centered">
@ -73,6 +73,25 @@
</div>
</li>
<li class="timeline-item">
<div class="timeline-info">
<span class="gradient-text">二月 21, 2020</span>
</div>
<div class="timeline-marker"></div>
<div class="timeline-content">
<a class="timeline-title" target="_self" href="/jenkins-update-solution-inside-gfw/">墙内 Jenkins 插件下载的一种解决方案</a>
<p>
¶前言
闲来无聊,在家折腾 DevOps第一步当然是部署一个 Jenkins 啦,然而一顿操作猛如虎,插件一个都下载不下来,总不能给 Jenkins 加个代理吧,所以有了下面这一通折腾。
¶原因
根据经验,国外这些软件下载失败基本上都是因为链接不上服务器,换个源就好了。所以简单百度,找到大量相关教程,换了清华源在内的四五个国内的源,均无效。
这就非常奇怪了所以我打开了清华源的updat...
</p>
</div>
</li>
<li class="timeline-item">
<div class="timeline-info">
<span class="gradient-text">二月 12, 2020</span>

View File

@ -60,7 +60,7 @@
<div class="content animated fadeIn">
<div class="set">
<h1 style="text-align: center">归档</h1>
<p style="text-align: center">8</p>
<p style="text-align: center">9</p>
<ul class="timeline timeline-centered">
@ -73,6 +73,25 @@
</div>
</li>
<li class="timeline-item">
<div class="timeline-info">
<span class="gradient-text">二月 21, 2020</span>
</div>
<div class="timeline-marker"></div>
<div class="timeline-content">
<a class="timeline-title" target="_self" href="/jenkins-update-solution-inside-gfw/">墙内 Jenkins 插件下载的一种解决方案</a>
<p>
¶前言
闲来无聊,在家折腾 DevOps第一步当然是部署一个 Jenkins 啦,然而一顿操作猛如虎,插件一个都下载不下来,总不能给 Jenkins 加个代理吧,所以有了下面这一通折腾。
¶原因
根据经验,国外这些软件下载失败基本上都是因为链接不上服务器,换个源就好了。所以简单百度,找到大量相关教程,换了清华源在内的四五个国内的源,均无效。
这就非常奇怪了所以我打开了清华源的updat...
</p>
</div>
</li>
<li class="timeline-item">
<div class="timeline-info">
<span class="gradient-text">二月 12, 2020</span>

View File

@ -1,6 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://blog.davidz.cn/jenkins-update-solution-inside-gfw/</loc>
<lastmod>2020-02-21</lastmod>
</url> <url>
<loc>https://blog.davidz.cn/write-latex-report-with-markdown/</loc>
<lastmod>2020-02-12</lastmod>
</url> <url>

View File

@ -351,7 +351,7 @@
</dl>
</div>
<ul>
<li><a href="/">8 <p>文章</p></a></li>
<li><a href="/">9 <p>文章</p></a></li>
<li><a href="/categories">5 <p>分类</p></a></li>
<li><a href="/tags">11 <p>标签</p></a></li>
</ul>

View File

@ -130,7 +130,7 @@
animation-duration: 2.8s;
background-image:
radial-gradient(ellipse closest-side, rgba(0, 0, 0, 0.56), #100e17),
url(//davidz.cn/static/blog/2020-02-10-kinsing-virus/cover.jpg);">
url(//davidz.cn/static/blog/2020-02-21-jenkins-update-solution-inside-gfw/intro.png);">
</div>
</div>
@ -140,16 +140,16 @@
<a href="/categories/DevOps"><b>
</b>DEVOPS<b></b></a>
二月 10, 2020
二月 21, 2020
</p>
<h3 class="post-title animated fadeInDown">
<a href="/kinsing-virus/" title="&quot;寄生&quot;于 Docker 的病毒 - Kinsing" class="posttitle">&quot;寄生&quot;于 Docker 的病毒 - Kinsing</a></h3>
<a href="/jenkins-update-solution-inside-gfw/" title="墙内 Jenkins 插件下载的一种解决方案" class="posttitle">墙内 Jenkins 插件下载的一种解决方案</a></h3>
<p class="post-count animated fadeInDown">
<span>
<b class="iconfont icon-text2"></b> <i>文章字数</i>
2.1k
2.6k
</span>
@ -162,22 +162,18 @@
</p>
<ul class="animated fadeInDown post-tags-list" itemprop="keywords"><li class="animated fadeInDown post-tags-list-item"><a class="animated fadeInDown post-tags-list-link" href="/tags/Docker/" rel="tag">Docker</a></li><li class="animated fadeInDown post-tags-list-item"><a class="animated fadeInDown post-tags-list-link" href="/tags/Linux/" rel="tag">Linux</a></li><li class="animated fadeInDown post-tags-list-item"><a class="animated fadeInDown post-tags-list-link" href="/tags/Shell/" rel="tag">Shell</a></li></ul>
<ul class="animated fadeInDown post-tags-list" itemprop="keywords"><li class="animated fadeInDown post-tags-list-item"><a class="animated fadeInDown post-tags-list-link" href="/tags/Linux/" rel="tag">Linux</a></li></ul>
<div class="md-content animated fadeIn">
<p>2020 年开年不顺2019 新型冠状病毒肺炎爆发,从年三十居家隔离到了正月十五,没想到自己的服务器也”感染“上了病毒 - Kinsing(进程的名字,姑且这样称呼)</p>
<p>闲来无聊,在家折腾 DevOps第一步当然是部署一个 Jenkins 啦,然而一顿操作猛如虎,插件一个都下载不下来,总不能给 Jenkins 加个代理吧,所以有了下面这一通折腾</p>
<p></p>
<p>偶然看了看服务器状态,发现 CPU 占用一直保持在 100%上下,有些蹊跷。</p>
<p>难道是我的博客访问量<s>暴增</s>???那是当然不可能的,然后我去看了看<a href="https://github.com/portainer/portainer" target="_blank" rel="noopener">Portainer</a>看了看,果然,</p>
<p></p>
<p>这个随机名称的容器就是 Kinsing 基于 Ubuntu 的容器CPU 占用 100%。</p>
<p></p>
<p>简单看了看容器里面的进程表,第一个运行了一个 shell 脚本,这个病毒就是这个脚本下载启动的关键,我打开看了看,<s>也没看懂</s>,大概是下载了几个可执行文件...</p>
<p>根据经验,国外这些软件下载失败基本上都是因为链接不上服务器,换个源就好了。所以简单百度,找到大量相关教程,换了<a href="https://mirrors.tuna.tsinghua.edu.cn/" target="_blank" rel="noopener">清华源</a>在内的四五个国内的源,均无效。</p>
<p>这就非常奇怪了,所以我打开了清华源的<a href="https://mirrors.tuna.tsinghua.edu.cn/jenkins/updates/update-center.json" target="_blank" rel="noopener">update-center.json</a>,仔细看了看,发现了蹊跷之处。原来,这个文件里面基本上所有插件的链接都指向了官网链接<code>http://updates.jenkins-ci.org/download/plugins/</code>。所以我们使用...</p>
<span class="read-more"><a href="/kinsing-virus/" title="查看全文" class="posttitle">查看全文</a>
<span class="read-more"><a href="/jenkins-update-solution-inside-gfw/" title="查看全文" class="posttitle">查看全文</a>
<b class="iconfont icon-arrow-right- gradient-text"></b></span>
</div>
</div>
@ -198,6 +194,61 @@
<div id="primary">
<div class="post" id="post">
<div class="post-cover animated fadeIn" style="
background-image:
radial-gradient(ellipse closest-side, rgba(0, 0, 0, 0.65), #100e17),
url(//davidz.cn/static/blog/2020-02-10-kinsing-virus/cover.jpg);">
</div>
<div class="else">
<p class="animated fadeInDown">
<a href="/categories/DevOps">
<b></b>DEVOPS<b></b>
</a>
二月 10, 2020
</p>
<h3 class="post-title animated fadeInDown"><a href="/kinsing-virus/" title="&quot;寄生&quot;于 Docker 的病毒 - Kinsing" class="posttitle">&quot;寄生&quot;于 Docker 的病毒 - Kinsing</a></h3>
<p class="post-count animated fadeInDown">
<span>
<b class="iconfont icon-text2"></b> <i>文章字数</i>
2.1k
</span>
<span>
<b class="iconfont icon-timer__s"></b> <i>阅读约需</i>
2 mins.
</span>
</p>
<ul class="animated fadeInDown post-tags-list" itemprop="keywords"><li class="animated fadeInDown post-tags-list-item"><a class="animated fadeInDown post-tags-list-link" href="/tags/Docker/" rel="tag">Docker</a></li><li class="animated fadeInDown post-tags-list-item"><a class="animated fadeInDown post-tags-list-link" href="/tags/Linux/" rel="tag">Linux</a></li><li class="animated fadeInDown post-tags-list-item"><a class="animated fadeInDown post-tags-list-link" href="/tags/Shell/" rel="tag">Shell</a></li></ul>
<div class="md-content animated fadeIn">
<p>2020 年开年不顺2019 新型冠状病毒肺炎爆发,从年三十居家隔离到了正月十五,没想到自己的服务器也”感染“上了病毒 - Kinsing(进程的名字,姑且这样称呼)。</p>
<p></p>
<p>偶然看了看服务器状态,发现 CPU 占用一直保持在 100%上下,有些蹊跷。</p>
<p>难道是我的博客访问量<s>暴增</s>???那是当然不可能的,然后我去看了看<a href="https://github.com/portainer/portainer" target="_blank" rel="noopener">Portainer</a>看了看,果然,</p>
<p></p>
<p>这个随机名称的容器就是 Kinsing 基于 Ubuntu 的容器CPU 占用 100%。</p>
<p></p>
<p>简单看了看容器里面的进程表,第一个运行了一个 shell...</p>
<span class="read-more"><a href="/kinsing-virus/" title="查看全文" class="posttitle">查看全文</a> <b class="iconfont icon-arrow-right- gradient-text"></b></span>
</div>
</div>
</div>
</div>
</div>

View File

@ -63,7 +63,7 @@
<div class="set">
<div class="category-mask"></div>
<h1>分类</h1>
<ul class="category-list"><li class="category-list-item"><a class="category-list-link" href="/categories/Productivity/">Productivity</a><span class="category-list-count">3</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/Internship/">Internship</a><span class="category-list-count">2</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/Personal/">Personal</a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/Study/">Study</a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/DevOps/">DevOps</a><span class="category-list-count">1</span></li></ul>
<ul class="category-list"><li class="category-list-item"><a class="category-list-link" href="/categories/Productivity/">Productivity</a><span class="category-list-count">3</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/Internship/">Internship</a><span class="category-list-count">2</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/DevOps/">DevOps</a><span class="category-list-count">2</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/Personal/">Personal</a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/Study/">Study</a><span class="category-list-count">1</span></li></ul>
</div>

View File

@ -191,7 +191,7 @@
</dl>
</div>
<ul>
<li><a href="/">8 <p>文章</p></a></li>
<li><a href="/">9 <p>文章</p></a></li>
<li><a href="/categories">5 <p>分类</p></a></li>
<li><a href="/tags">11 <p>标签</p></a></li>
</ul>

View File

@ -130,47 +130,50 @@
animation-duration: 2.8s;
background-image:
radial-gradient(ellipse closest-side, rgba(0, 0, 0, 0.56), #100e17),
url(//davidz.cn/static/blog/2020-02-12-write-latex-report-with-markdown/cover.jpg);">
url(//davidz.cn/static/blog/2020-02-21-jenkins-update-solution-inside-gfw/intro.png);">
</div>
</div>
<div id="post0" class="else">
<p class="animated fadeInDown">
<a href="/categories/Productivity"><b>
</b>PRODUCTIVITY<b></b></a>
<a href="/categories/DevOps"><b>
</b>DEVOPS<b></b></a>
二月 12, 2020
二月 21, 2020
</p>
<h3 class="post-title animated fadeInDown">
<a href="/write-latex-report-with-markdown/" title="使用 Markdown 编写基于 Latex 的报告" class="posttitle">使用 Markdown 编写基于 Latex 的报告</a></h3>
<a href="/jenkins-update-solution-inside-gfw/" title="墙内 Jenkins 插件下载的一种解决方案" class="posttitle">墙内 Jenkins 插件下载的一种解决方案</a></h3>
<p class="post-count animated fadeInDown">
<span>
<b class="iconfont icon-text2"></b> <i>文章字数</i>
6.7k
2.6k
</span>
<span>
<b class="iconfont icon-timer__s"></b> <i>阅读约需</i>
6 mins.
2 mins.
</span>
</p>
<ul class="animated fadeInDown post-tags-list" itemprop="keywords"><li class="animated fadeInDown post-tags-list-item"><a class="animated fadeInDown post-tags-list-link" href="/tags/Markdown/" rel="tag">Markdown</a></li><li class="animated fadeInDown post-tags-list-item"><a class="animated fadeInDown post-tags-list-link" href="/tags/Windows/" rel="tag">Windows</a></li></ul>
<ul class="animated fadeInDown post-tags-list" itemprop="keywords"><li class="animated fadeInDown post-tags-list-item"><a class="animated fadeInDown post-tags-list-link" href="/tags/Linux/" rel="tag">Linux</a></li></ul>
<div class="md-content animated fadeIn">
<p>计算机这个专业,有很多报告要做。在山威的时候,报告格式没有什么限制 WordPDF 都可以,那个时候我开始使用 Markdown 作为我的排版工具,因为实在是没有时间经历去研究 Word 的各种高级功能(<s>主要是懒</s>。Markdown 十分简单,易学,在<a href="https://github.com" target="_blank" rel="noopener">Github</a>等计算机专业相关平台使用也非常广泛,还可以通过各种模板快速生成<strong>好看</strong><strong>美观</strong><strong>专业</strong>的文档。</p>
<p>后来到了澳国立,老师教授们开始极力鼓吹 Latex 和 PDF基本上算是软性要求我们使用 Latex 编写,还规定了衬线字体,非衬线字体,字号,段落等等,图片还需要是 SVG 格式的矢量图片(最奇葩的是竟然一整节课只讲这个😂),最后生成 PDF...</p>
<p>闲来无聊,在家折腾 DevOps第一步当然是部署一个 Jenkins 啦,然而一顿操作猛如虎,插件一个都下载不下来,总不能给 Jenkins 加个代理吧,所以有了下面这一通折腾。</p>
<p></p>
<p>根据经验,国外这些软件下载失败基本上都是因为链接不上服务器,换个源就好了。所以简单百度,找到大量相关教程,换了<a href="https://mirrors.tuna.tsinghua.edu.cn/" target="_blank" rel="noopener">清华源</a>在内的四五个国内的源,均无效。</p>
<p>这就非常奇怪了,所以我打开了清华源的<a href="https://mirrors.tuna.tsinghua.edu.cn/jenkins/updates/update-center.json" target="_blank" rel="noopener">update-center.json</a>,仔细看了看,发现了蹊跷之处。原来,这个文件里面基本上所有插件的链接都指向了官网链接<code>http://updates.jenkins-ci.org/download/plugins/</code>。所以我们使用...</p>
<span class="read-more"><a href="/write-latex-report-with-markdown/" title="查看全文" class="posttitle">查看全文</a>
<span class="read-more"><a href="/jenkins-update-solution-inside-gfw/" title="查看全文" class="posttitle">查看全文</a>
<b class="iconfont icon-arrow-right- gradient-text"></b></span>
</div>
</div>
@ -191,6 +194,54 @@
<div id="primary">
<div class="post" id="post">
<div class="post-cover animated fadeIn" style="
background-image:
radial-gradient(ellipse closest-side, rgba(0, 0, 0, 0.65), #100e17),
url(//davidz.cn/static/blog/2020-02-12-write-latex-report-with-markdown/cover.jpg);">
</div>
<div class="else">
<p class="animated fadeInDown">
<a href="/categories/Productivity">
<b></b>PRODUCTIVITY<b></b>
</a>
二月 12, 2020
</p>
<h3 class="post-title animated fadeInDown"><a href="/write-latex-report-with-markdown/" title="使用 Markdown 编写基于 Latex 的报告" class="posttitle">使用 Markdown 编写基于 Latex 的报告</a></h3>
<p class="post-count animated fadeInDown">
<span>
<b class="iconfont icon-text2"></b> <i>文章字数</i>
6.7k
</span>
<span>
<b class="iconfont icon-timer__s"></b> <i>阅读约需</i>
6 mins.
</span>
</p>
<ul class="animated fadeInDown post-tags-list" itemprop="keywords"><li class="animated fadeInDown post-tags-list-item"><a class="animated fadeInDown post-tags-list-link" href="/tags/Markdown/" rel="tag">Markdown</a></li><li class="animated fadeInDown post-tags-list-item"><a class="animated fadeInDown post-tags-list-link" href="/tags/Windows/" rel="tag">Windows</a></li></ul>
<div class="md-content animated fadeIn">
<p>计算机这个专业,有很多报告要做。在山威的时候,报告格式没有什么限制 WordPDF 都可以,那个时候我开始使用 Markdown 作为我的排版工具,因为实在是没有时间经历去研究 Word 的各种高级功能(<s>主要是懒</s>。Markdown 十分简单,易学,在<a href="https://github.com" target="_blank" rel="noopener">Github</a>等计算机专业相关平台使用也非常广泛,还可以通过各种模板快速生成<strong>好看</strong><strong>美观</strong><strong>专业</strong>的文档。</p>
<p>后来到了澳国立,老师教授们开始极力鼓吹 Latex 和 PDF基本上算是软性要求我们使用 Latex 编写,还规定了衬线字体,非衬线字体,字号...</p>
<span class="read-more"><a href="/write-latex-report-with-markdown/" title="查看全文" class="posttitle">查看全文</a> <b class="iconfont icon-arrow-right- gradient-text"></b></span>
</div>
</div>
</div>
<div class="post" id="post">
<div class="post-cover animated fadeIn" style="
background-image:

View File

@ -364,7 +364,7 @@ set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib/)
</dl>
</div>
<ul>
<li><a href="/">8 <p>文章</p></a></li>
<li><a href="/">9 <p>文章</p></a></li>
<li><a href="/categories">5 <p>分类</p></a></li>
<li><a href="/tags">11 <p>标签</p></a></li>
</ul>

View File

@ -292,7 +292,7 @@ C:\WINDOWS\SysWOW64\drivers
</dl>
</div>
<ul>
<li><a href="/">8 <p>文章</p></a></li>
<li><a href="/">9 <p>文章</p></a></li>
<li><a href="/categories">5 <p>分类</p></a></li>
<li><a href="/tags">11 <p>标签</p></a></li>
</ul>

View File

@ -0,0 +1,494 @@
<!DOCTYPE html>
<html lang="zh-CN" class="loading">
<head>
<!-- hexo-inject:begin --><!-- hexo-inject:end --><meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>墙内 Jenkins 插件下载的一种解决方案 - Blog</title>
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="google" content="notranslate" />
<meta name="keywords" content="Developer, Python, C++, JavaScript, Java,">
<meta name="description" content="DavidZ&#39;s Blog,前言
闲来无聊,在家折腾 DevOps第一步当然是部署一个 Jenkins 啦,然而一顿操作猛如虎,插件一个都下载不下来,总不能给 Jenkins 加个代理吧,所以有了下面这一通折腾。
¶原因
,">
<meta name="author" content="DavidZ">
<link rel="alternative" href="atom.xml" title="Blog" type="application/atom+xml">
<link rel="icon" href="/img/favicon.png">
<link href="https://fonts.loli.net/css?family=Roboto+Mono|Rubik&display=swap" rel="stylesheet">
<link rel="stylesheet" href="//at.alicdn.com/t/font_1429596_nzgqgvnmkjb.css">
<link rel="stylesheet" href="//cdn.bootcss.com/animate.css/3.7.2/animate.min.css">
<link rel="stylesheet" href="//cdn.bootcss.com/social-share.js/1.0.16/css/share.min.css">
<link rel="stylesheet" href="//cdn.bootcss.com/codemirror/5.48.4/codemirror.min.css">
<link rel="stylesheet" href="//cdn.bootcss.com/codemirror/5.48.4/theme/dracula.css">
<link rel="stylesheet" href="/css/obsidian.css">
<link rel="stylesheet" href="/css/ball-atom.min.css">
<meta name="generator" content="Hexo 4.2.0"><!-- hexo-inject:begin --><!-- hexo-inject:end --></head>
<body class="loading">
<!-- hexo-inject:begin --><!-- hexo-inject:end --><div class="loader">
<div class="la-ball-atom la-2x">
<div></div>
<div></div>
<div></div>
<div></div>
</div>
</div>
<span id="config-title" style="display:none">Blog</span>
<div id="loader"></div>
<div id="single">
<div class="scrollbar gradient-bg-rev"></div>
<div id="top" style="display: block;">
<div class="bar" style="width: 0;"></div>
<div class="navigation animated fadeIn fast delay-1s">
<img id="home-icon" class="icon-home" src="/img/favicon.png" alt="" data-url="https://blog.davidz.cn">
<div id="play-icon" title="Play/Pause" class="iconfont icon-play"></div>
<h3 class="subtitle">墙内 Jenkins 插件下载的一种解决方案</h3>
<div class="social">
<!-- <div class="like-icon">-->
<!-- <a href="javascript:;" class="likeThis active"><span class="icon-like"></span><span class="count">76</span></a>-->
<!-- </div>-->
<div>
<div class="share">
<a href="javascript:;" class="iconfont icon-share1"></a>
<div class="share-component-cc" data-disabled="facebook,douban,linkedin,diandian,tencent,google"></div>
</div>
</div>
</div>
</div>
</div>
<div class="section">
<div class=article-header-wrapper>
<div class="article-header">
<div class="article-cover animated fadeIn" style="
animation-delay: 600ms;
animation-duration: 1.2s;
background-image:
radial-gradient(ellipse closest-side, rgba(0, 0, 0, 0.65), #100e17),
url(//davidz.cn/static/blog/2020-02-21-jenkins-update-solution-inside-gfw/intro.png);">
</div>
<div class="else">
<p class="animated fadeInDown">
<a href="/categories/DevOps"><b>
</b>DEVOPS<b></b></a>
二月 21, 2020
</p>
<h3 class="post-title animated fadeInDown"><a href="/jenkins-update-solution-inside-gfw/" title="墙内 Jenkins 插件下载的一种解决方案" class="">墙内 Jenkins 插件下载的一种解决方案</a>
</h3>
<p class="post-count animated fadeInDown">
<span>
<b class="iconfont icon-text2"></b> <i>文章字数</i>
2.6k
</span>
<span>
<b class="iconfont icon-timer__s"></b> <i>阅读约需</i>
2 mins.
</span>
<span id="busuanzi_container_page_pv">
<b class="iconfont icon-read"></b> <i>阅读次数</i>
<span id="busuanzi_value_page_pv">0</span>
</span>
</p>
<ul class="animated fadeInDown post-tags-list" itemprop="keywords"><li class="animated fadeInDown post-tags-list-item"><a class="animated fadeInDown post-tags-list-link" href="/tags/Linux/" rel="tag">Linux</a></li></ul>
</div>
</div>
</div>
<div class="screen-gradient-after">
<div class="screen-gradient-content">
<div class="screen-gradient-content-inside">
<div class="bold-underline-links screen-gradient-sponsor">
<p>
<span class="animated fadeIn delay-1s"></span>
</p>
</div>
</div>
</div>
</div>
<div class="article">
<div class='main'>
<div class="content markdown animated fadeIn">
<h2 id="前言"><a class="header-anchor" href="#前言"></a>前言</h2>
<p>闲来无聊,在家折腾 DevOps第一步当然是部署一个 Jenkins 啦,然而一顿操作猛如虎,插件一个都下载不下来,总不能给 Jenkins 加个代理吧,所以有了下面这一通折腾。</p>
<h2 id="原因"><a class="header-anchor" href="#原因"></a>原因</h2>
<p><img src="//davidz.cn/static/blog/2020-02-21-jenkins-update-solution-inside-gfw/intro.png" alt="下载超时"></p>
<p>根据经验,国外这些软件下载失败基本上都是因为链接不上服务器,换个源就好了。所以简单百度,找到大量相关教程,换了<a href="https://mirrors.tuna.tsinghua.edu.cn/" target="_blank" rel="noopener">清华源</a>在内的四五个国内的源,均无效。</p>
<p>这就非常奇怪了,所以我打开了清华源的<a href="https://mirrors.tuna.tsinghua.edu.cn/jenkins/updates/update-center.json" target="_blank" rel="noopener">update-center.json</a>,仔细看了看,发现了蹊跷之处。原来,这个文件里面基本上所有插件的链接都指向了官网链接<code>http://updates.jenkins-ci.org/download/plugins/</code>。所以我们使用<code>https://mirrors.tuna.tsinghua.edu.cn/jenkins/updates/update-center.json</code>只加速了下载这个文件的过程,而并没有加速下载插件的过程。</p>
<h2 id="解决方案"><a class="header-anchor" href="#解决方案"></a>解决方案</h2>
<p>那么解决方案就很简单了,我们只需要把<code>/var/jenkins_home/updates/default.json</code>这个文件中的所有</p>
<pre><code class="language-htmlmixed">http://updates.jenkins-ci.org/download/plugins/
</code></pre>
<p>替换成,</p>
<pre><code class="language-htmlmixed">https://mirrors.tuna.tsinghua.edu.cn/jenkins/plugins/
</code></pre>
<p>这样就好啦,但是总不能每次都自己手动替换吧,所以有下面这两个稍微复杂一点的自动化解决方案。</p>
<h3 id="方案-1-使用-nginx-重定向"><a class="header-anchor" href="#方案-1-使用-nginx-重定向"></a>方案 1 使用 nginx 重定向</h3>
<p>这个方法是参考的<a href="https://my.oschina.net/VASKS/blog/3106314" target="_blank" rel="noopener">jenkins 插件下载加速最终方案</a></p>
<p>具体我没有试,但是我之前写过 Nginx 的重定向,简单来讲就是遇到官方的地址,就重定向到清华源,配置起来稍微复杂一点。</p>
<h3 id="方案-2-自己搭建-Jenkins-Update-Center"><a class="header-anchor" href="#方案-2-自己搭建-Jenkins-Update-Center"></a>方案 2 自己搭建 Jenkins Update Center</h3>
<p>这个是我自己尝试出来的,原理就是我在服务器上定时(每小时)从清华源下载<code>update-center.json</code>,然后再把里面的 URL 替换成正确的地址,然后对外提供服务。</p>
<p>但是 Jenkins 对于<code>update-center.json</code>的地址有验证,<a href="https://github.com/jenkins-zh/mirror-adapter" target="_blank" rel="noopener">具体验证方法</a>不清楚(<s>我实在是懒的研究了</s>)。</p>
<blockquote>
<p>山重水复疑无路,柳暗花明又一村</p>
</blockquote>
<p>我在 Jenkins 的 Issue 里面找到一个<a href="https://issues.jenkins-ci.org/browse/JENKINS-11598?focusedCommentId=212431&amp;page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-212431" target="_blank" rel="noopener">老哥</a>说验证这个功能可以通过属性参数关闭,于是,这个问题就很简单啦。</p>
<pre><code class="language-shell">hudson.model.DownloadService.noSignatureCheck=true
</code></pre>
<p>加上这个属性就好啦。</p>
<p><a href="https://jenkins-update.davidz.cn/" target="_blank" rel="noopener">具体教程</a></p>
<p>哈,插件全秒!😄</p>
<!--[if lt IE 9]><script>document.createElement('audio');</script><![endif]-->
<audio id="audio" loop="1" preload="auto" controls="controls"
data-autoplay="false">
<source type="audio/mpeg" src="//davidz.cn/static/blog/mp3/guangliang---tonghua.mp3">
</audio>
<div id='gitalk-container' class="comment link"
data-ae='true'
data-ci='489076c5dd3f5ba13f67'
data-cs='d6e3b245787b0b74d0dbe2639ef87f452a401194'
data-r='blog.davidz.cn'
data-o='DavidZhang73'
data-a='DavidZhang73'
data-d=''
>留言</div>
</div>
<div class="sidebar">
<div class="box animated fadeInRight">
<div class="subbox">
<img src="//davidz.cn/static/blog/img/avator.jpg" height=300 width=300></img>
<p>DavidZ</p>
<span>凡事都要留几分</span>
<dl>
<dd><a href="https://github.com/DavidZhang73" target="_blank"><span
class=" iconfont icon-github"></span></a></dd>
<dd><a href="https://twitter.com/david731998" target="_blank"><span
class=" iconfont icon-twitter"></span></a></dd>
<dd><a href="https://stackoverflow.com/users/12693553/davidz" target="_blank"><span
class=" iconfont icon-stack-overflow"></span></a></dd>
</dl>
</div>
<ul>
<li><a href="/">9 <p>文章</p></a></li>
<li><a href="/categories">5 <p>分类</p></a></li>
<li><a href="/tags">11 <p>标签</p></a></li>
</ul>
</div>
<div class="box sticky animated fadeInRight faster">
<div id="toc" class="subbox">
<h4>目录</h4>
<ol class="toc"><li class="toc-item toc-level-2"><a class="toc-link" href="#前言"><span class="toc-number">1.</span> <span class="toc-text">¶前言</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#原因"><span class="toc-number">2.</span> <span class="toc-text">¶原因</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#解决方案"><span class="toc-number">3.</span> <span class="toc-text">¶解决方案</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#方案-1-使用-nginx-重定向"><span class="toc-number">3.1.</span> <span class="toc-text">¶方案 1 使用 nginx 重定向</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#方案-2-自己搭建-Jenkins-Update-Center"><span class="toc-number">3.2.</span> <span class="toc-text">¶方案 2 自己搭建 Jenkins Update Center</span></a></li></ol></li></ol>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div id="back-to-top" class="animated fadeIn faster">
<div class="flow"></div>
<span class="percentage animated fadeIn faster">0%</span>
<span class="iconfont icon-top02 animated fadeIn faster"></span>
</div><!-- hexo-inject:begin --><!-- hexo-inject:end -->
</body>
<footer>
<p class="copyright" id="copyright">
&copy; 2020
<span class="gradient-text">
DavidZ
</span>.
Powered by <a href="http://hexo.io/" title="Hexo" target="_blank" rel="noopener">Hexo</a>
Theme
<span class="gradient-text">
<a href="https://github.com/TriDiamond/hexo-theme-obsidian" title="Obsidian" target="_blank" rel="noopener">Obsidian</a>
</span>
<small><a href="https://github.com/TriDiamond/hexo-theme-obsidian/blob/master/CHANGELOG.md" title="v1.4.3" target="_blank" rel="noopener">v1.4.3</a></small>
</p>
</footer>
<script type="text/javascript" src="https://cdn.bootcss.com/mathjax/2.7.6/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
<script>
MathJax.Hub.Config({
"HTML-CSS": {
preferredFont: "TeX",
availableFonts: ["STIX", "TeX"],
linebreaks: {
automatic: true
},
EqnChunk: (MathJax.Hub.Browser.isMobile ? 10 : 50)
},
tex2jax: {
inlineMath: [
["$", "$"],
["\\(", "\\)"]
],
processEscapes: true,
ignoreClass: "tex2jax_ignore|dno",
skipTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code']
},
TeX: {
noUndefined: {
attributes: {
mathcolor: "red",
mathbackground: "#FFEEEE",
mathsize: "90%"
}
},
Macros: {
href: "{}"
}
},
messageStyle: "none"
});
</script>
<script>
function initialMathJax() {
MathJax.Hub.Queue(function () {
var all = MathJax.Hub.getAllJax(),
i;
// console.log(all);
for (i = 0; i < all.length; i += 1) {
all[i].SourceElement().parentNode.className += ' has-jax';
}
});
}
function reprocessMathJax() {
if (typeof MathJax !== 'undefined') {
MathJax.Hub.Queue(["Typeset", MathJax.Hub]);
}
}
</script>
<link rel="stylesheet" href="//cdn.bootcss.com/gitalk/1.5.0/gitalk.min.css">
<script src="//cdn.bootcss.com/gitalk/1.5.0/gitalk.min.js"></script>
<script src="//cdn.bootcss.com/jquery/3.4.1/jquery.min.js"></script>
<script src="/js/plugin.js"></script>
<script src="/js/obsidian.js"></script>
<script src="/js/jquery.truncate.js"></script>
<script src="/js/search.js"></script>
<script src="//cdn.bootcss.com/typed.js/2.0.10/typed.min.js"></script>
<script src="//cdn.bootcss.com/blueimp-md5/2.12.0/js/md5.min.js"></script>
<script src="//cdn.bootcss.com/social-share.js/1.0.16/js/social-share.min.js"></script>
<script src="https://cdn.bootcss.com/codemirror/5.48.4/codemirror.min.js"></script>
<script src="//cdn.bootcss.com/codemirror/5.48.4/mode/javascript/javascript.min.js"></script>
<script src="//cdn.bootcss.com/codemirror/5.48.4/mode/css/css.min.js"></script>
<script src="//cdn.bootcss.com/codemirror/5.48.4/mode/xml/xml.min.js"></script>
<script src="//cdn.bootcss.com/codemirror/5.48.4/mode/htmlmixed/htmlmixed.min.js"></script>
<script src="//cdn.bootcss.com/codemirror/5.48.4/mode/clike/clike.min.js"></script>
<script src="//cdn.bootcss.com/codemirror/5.48.4/mode/php/php.min.js"></script>
<script src="//cdn.bootcss.com/codemirror/5.48.4/mode/shell/shell.min.js"></script>
<script src="//cdn.bootcss.com/codemirror/5.48.4/mode/python/python.min.js"></script>
<script src="//cdn.bootcss.com/codemirror/5.48.4/mode/cmake/cmake.min.js"></script>
<script src="//cdn.bootcss.com/codemirror/5.48.4/mode/powershell/powershell.min.js"></script>
<script src="//cdn.bootcss.com/codemirror/5.48.4/mode/yaml/yaml.min.js"></script>
<script src="/js/busuanzi.min.js"></script>
<script>
$(document).ready(function () {
if ($('span[id^="busuanzi_"]').length) {
initialBusuanzi();
}
});
</script>
<link rel="stylesheet" href="//cdn.bootcss.com/photoswipe/4.1.3/photoswipe.min.css">
<link rel="stylesheet" href="//cdn.bootcss.com/photoswipe/4.1.3/default-skin/default-skin.min.css">
<script src="//cdn.bootcss.com/photoswipe/4.1.3/photoswipe.min.js"></script>
<script src="//cdn.bootcss.com/photoswipe/4.1.3/photoswipe-ui-default.min.js"></script>
<!-- Root element of PhotoSwipe. Must have class pswp. -->
<div class="pswp" tabindex="-1" role="dialog" aria-hidden="true">
<!-- Background of PhotoSwipe.
It's a separate element as animating opacity is faster than rgba(). -->
<div class="pswp__bg"></div>
<!-- Slides wrapper with overflow:hidden. -->
<div class="pswp__scroll-wrap">
<!-- Container that holds slides.
PhotoSwipe keeps only 3 of them in the DOM to save memory.
Don't modify these 3 pswp__item elements, data is added later on. -->
<div class="pswp__container">
<div class="pswp__item"></div>
<div class="pswp__item"></div>
<div class="pswp__item"></div>
</div>
<!-- Default (PhotoSwipeUI_Default) interface on top of sliding area. Can be changed. -->
<div class="pswp__ui pswp__ui--hidden">
<div class="pswp__top-bar">
<!-- Controls are self-explanatory. Order can be changed. -->
<div class="pswp__counter"></div>
<button class="pswp__button pswp__button--close" title="Close (Esc)"></button>
<button class="pswp__button pswp__button--share" title="Share"></button>
<button class="pswp__button pswp__button--fs" title="Toggle fullscreen"></button>
<button class="pswp__button pswp__button--zoom" title="Zoom in/out"></button>
<!-- Preloader demo http://codepen.io/dimsemenov/pen/yyBWoR -->
<!-- element will get class pswp__preloader--active when preloader is running -->
<div class="pswp__preloader">
<div class="pswp__preloader__icn">
<div class="pswp__preloader__cut">
<div class="pswp__preloader__donut"></div>
</div>
</div>
</div>
</div>
<div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap">
<div class="pswp__share-tooltip"></div>
</div>
<button class="pswp__button pswp__button--arrow--left" title="Previous (arrow left)">
</button>
<button class="pswp__button pswp__button--arrow--right" title="Next (arrow right)">
</button>
<div class="pswp__caption">
<div class="pswp__caption__center"></div>
</div>
</div>
</div>
</div>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="//www.googletagmanager.com/gtag/js?id=UA-157733505-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-157733505-1');
</script>
<script>
function initialTyped () {
var typedTextEl = $('.typed-text');
if (typedTextEl && typedTextEl.length > 0) {
var typed = new Typed('.typed-text', {
strings: ["凡事都要留几分", "颜值是第一生产力"],
typeSpeed: 90,
loop: true,
loopCount: Infinity,
backSpeed: 20,
});
}
}
if ($('.article-header') && $('.article-header').length) {
$(document).ready(function () {
initialTyped();
});
}
</script>
</html>

View File

@ -213,7 +213,7 @@
</dl>
</div>
<ul>
<li><a href="/">8 <p>文章</p></a></li>
<li><a href="/">9 <p>文章</p></a></li>
<li><a href="/categories">5 <p>分类</p></a></li>
<li><a href="/tags">11 <p>标签</p></a></li>
</ul>

View File

@ -3,6 +3,31 @@
<entry>
<title>墙内 Jenkins 插件下载的一种解决方案</title>
<link href="/jenkins-update-solution-inside-gfw/"/>
<url>/jenkins-update-solution-inside-gfw/</url>
<content type="html"><![CDATA[<h2 id="前言"><a class="header-anchor" href="#前言">¶</a>前言</h2><p>闲来无聊,在家折腾 DevOps第一步当然是部署一个 Jenkins 啦,然而一顿操作猛如虎,插件一个都下载不下来,总不能给 Jenkins 加个代理吧,所以有了下面这一通折腾。</p><h2 id="原因"><a class="header-anchor" href="#原因">¶</a>原因</h2><p><img src="//davidz.cn/static/blog/2020-02-21-jenkins-update-solution-inside-gfw/intro.png" alt="下载超时"></p><p>根据经验,国外这些软件下载失败基本上都是因为链接不上服务器,换个源就好了。所以简单百度,找到大量相关教程,换了<a href="https://mirrors.tuna.tsinghua.edu.cn/" target="_blank" rel="noopener">清华源</a>在内的四五个国内的源,均无效。</p><p>这就非常奇怪了,所以我打开了清华源的<a href="https://mirrors.tuna.tsinghua.edu.cn/jenkins/updates/update-center.json" target="_blank" rel="noopener">update-center.json</a>,仔细看了看,发现了蹊跷之处。原来,这个文件里面基本上所有插件的链接都指向了官网链接<code>http://updates.jenkins-ci.org/download/plugins/</code>。所以我们使用<code>https://mirrors.tuna.tsinghua.edu.cn/jenkins/updates/update-center.json</code>只加速了下载这个文件的过程,而并没有加速下载插件的过程。</p><h2 id="解决方案"><a class="header-anchor" href="#解决方案">¶</a>解决方案</h2><p>那么解决方案就很简单了,我们只需要把<code>/var/jenkins_home/updates/default.json</code>这个文件中的所有</p><pre><code class="language-htmlmixed">http://updates.jenkins-ci.org/download/plugins/</code></pre><p>替换成,</p><pre><code class="language-htmlmixed">https://mirrors.tuna.tsinghua.edu.cn/jenkins/plugins/</code></pre><p>这样就好啦,但是总不能每次都自己手动替换吧,所以有下面这两个稍微复杂一点的自动化解决方案。</p><h3 id="方案-1-使用-nginx-重定向"><a class="header-anchor" href="#方案-1-使用-nginx-重定向">¶</a>方案 1 使用 nginx 重定向</h3><p>这个方法是参考的<a href="https://my.oschina.net/VASKS/blog/3106314" target="_blank" rel="noopener">jenkins 插件下载加速最终方案</a></p><p>具体我没有试,但是我之前写过 Nginx 的重定向,简单来讲就是遇到官方的地址,就重定向到清华源,配置起来稍微复杂一点。</p><h3 id="方案-2-自己搭建-Jenkins-Update-Center"><a class="header-anchor" href="#方案-2-自己搭建-Jenkins-Update-Center">¶</a>方案 2 自己搭建 Jenkins Update Center</h3><p>这个是我自己尝试出来的,原理就是我在服务器上定时(每小时)从清华源下载<code>update-center.json</code>,然后再把里面的 URL 替换成正确的地址,然后对外提供服务。</p><p>但是 Jenkins 对于<code>update-center.json</code>的地址有验证,<a href="https://github.com/jenkins-zh/mirror-adapter" target="_blank" rel="noopener">具体验证方法</a>不清楚(<s>我实在是懒的研究了</s>)。</p><blockquote><p>山重水复疑无路,柳暗花明又一村</p></blockquote><p>我在 Jenkins 的 Issue 里面找到一个<a href="https://issues.jenkins-ci.org/browse/JENKINS-11598?focusedCommentId=212431&amp;page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-212431" target="_blank" rel="noopener">老哥</a>说验证这个功能可以通过属性参数关闭,于是,这个问题就很简单啦。</p><pre><code class="language-shell">hudson.model.DownloadService.noSignatureCheck=true</code></pre><p>加上这个属性就好啦。</p><p><a href="https://jenkins-update.davidz.cn/" target="_blank" rel="noopener">具体教程</a></p><p>哈,插件全秒!😄</p>]]></content>
<categories>
<category> DevOps </category>
</categories>
<tags>
<tag> Linux </tag>
</tags>
</entry>
<entry>
<title>使用 Markdown 编写基于 Latex 的报告</title>
<link href="/write-latex-report-with-markdown/"/>

View File

@ -1,6 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://blog.davidz.cn/jenkins-update-solution-inside-gfw/</loc>
<lastmod>2020-02-21T07:48:41.000Z</lastmod>
</url>
<url>
<loc>https://blog.davidz.cn/write-latex-report-with-markdown/</loc>

View File

@ -130,7 +130,7 @@
animation-duration: 2.8s;
background-image:
radial-gradient(ellipse closest-side, rgba(0, 0, 0, 0.56), #100e17),
url(//davidz.cn/static/blog/2020-02-10-kinsing-virus/cover.jpg);">
url(//davidz.cn/static/blog/2020-02-21-jenkins-update-solution-inside-gfw/intro.png);">
</div>
</div>
@ -140,16 +140,16 @@
<a href="/categories/DevOps"><b>
</b>DEVOPS<b></b></a>
二月 10, 2020
二月 21, 2020
</p>
<h3 class="post-title animated fadeInDown">
<a href="/kinsing-virus/" title="&quot;寄生&quot;于 Docker 的病毒 - Kinsing" class="posttitle">&quot;寄生&quot;于 Docker 的病毒 - Kinsing</a></h3>
<a href="/jenkins-update-solution-inside-gfw/" title="墙内 Jenkins 插件下载的一种解决方案" class="posttitle">墙内 Jenkins 插件下载的一种解决方案</a></h3>
<p class="post-count animated fadeInDown">
<span>
<b class="iconfont icon-text2"></b> <i>文章字数</i>
2.1k
2.6k
</span>
@ -162,22 +162,18 @@
</p>
<ul class="animated fadeInDown post-tags-list" itemprop="keywords"><li class="animated fadeInDown post-tags-list-item"><a class="animated fadeInDown post-tags-list-link" href="/tags/Docker/" rel="tag">Docker</a></li><li class="animated fadeInDown post-tags-list-item"><a class="animated fadeInDown post-tags-list-link" href="/tags/Linux/" rel="tag">Linux</a></li><li class="animated fadeInDown post-tags-list-item"><a class="animated fadeInDown post-tags-list-link" href="/tags/Shell/" rel="tag">Shell</a></li></ul>
<ul class="animated fadeInDown post-tags-list" itemprop="keywords"><li class="animated fadeInDown post-tags-list-item"><a class="animated fadeInDown post-tags-list-link" href="/tags/Linux/" rel="tag">Linux</a></li></ul>
<div class="md-content animated fadeIn">
<p>2020 年开年不顺2019 新型冠状病毒肺炎爆发,从年三十居家隔离到了正月十五,没想到自己的服务器也”感染“上了病毒 - Kinsing(进程的名字,姑且这样称呼)</p>
<p>闲来无聊,在家折腾 DevOps第一步当然是部署一个 Jenkins 啦,然而一顿操作猛如虎,插件一个都下载不下来,总不能给 Jenkins 加个代理吧,所以有了下面这一通折腾</p>
<p></p>
<p>偶然看了看服务器状态,发现 CPU 占用一直保持在 100%上下,有些蹊跷。</p>
<p>难道是我的博客访问量<s>暴增</s>???那是当然不可能的,然后我去看了看<a href="https://github.com/portainer/portainer" target="_blank" rel="noopener">Portainer</a>看了看,果然,</p>
<p></p>
<p>这个随机名称的容器就是 Kinsing 基于 Ubuntu 的容器CPU 占用 100%。</p>
<p></p>
<p>简单看了看容器里面的进程表,第一个运行了一个 shell 脚本,这个病毒就是这个脚本下载启动的关键,我打开看了看,<s>也没看懂</s>,大概是下载了几个可执行文件...</p>
<p>根据经验,国外这些软件下载失败基本上都是因为链接不上服务器,换个源就好了。所以简单百度,找到大量相关教程,换了<a href="https://mirrors.tuna.tsinghua.edu.cn/" target="_blank" rel="noopener">清华源</a>在内的四五个国内的源,均无效。</p>
<p>这就非常奇怪了,所以我打开了清华源的<a href="https://mirrors.tuna.tsinghua.edu.cn/jenkins/updates/update-center.json" target="_blank" rel="noopener">update-center.json</a>,仔细看了看,发现了蹊跷之处。原来,这个文件里面基本上所有插件的链接都指向了官网链接<code>http://updates.jenkins-ci.org/download/plugins/</code>。所以我们使用...</p>
<span class="read-more"><a href="/kinsing-virus/" title="查看全文" class="posttitle">查看全文</a>
<span class="read-more"><a href="/jenkins-update-solution-inside-gfw/" title="查看全文" class="posttitle">查看全文</a>
<b class="iconfont icon-arrow-right- gradient-text"></b></span>
</div>
</div>
@ -198,6 +194,61 @@
<div id="primary">
<div class="post" id="post">
<div class="post-cover animated fadeIn" style="
background-image:
radial-gradient(ellipse closest-side, rgba(0, 0, 0, 0.65), #100e17),
url(//davidz.cn/static/blog/2020-02-10-kinsing-virus/cover.jpg);">
</div>
<div class="else">
<p class="animated fadeInDown">
<a href="/categories/DevOps">
<b></b>DEVOPS<b></b>
</a>
二月 10, 2020
</p>
<h3 class="post-title animated fadeInDown"><a href="/kinsing-virus/" title="&quot;寄生&quot;于 Docker 的病毒 - Kinsing" class="posttitle">&quot;寄生&quot;于 Docker 的病毒 - Kinsing</a></h3>
<p class="post-count animated fadeInDown">
<span>
<b class="iconfont icon-text2"></b> <i>文章字数</i>
2.1k
</span>
<span>
<b class="iconfont icon-timer__s"></b> <i>阅读约需</i>
2 mins.
</span>
</p>
<ul class="animated fadeInDown post-tags-list" itemprop="keywords"><li class="animated fadeInDown post-tags-list-item"><a class="animated fadeInDown post-tags-list-link" href="/tags/Docker/" rel="tag">Docker</a></li><li class="animated fadeInDown post-tags-list-item"><a class="animated fadeInDown post-tags-list-link" href="/tags/Linux/" rel="tag">Linux</a></li><li class="animated fadeInDown post-tags-list-item"><a class="animated fadeInDown post-tags-list-link" href="/tags/Shell/" rel="tag">Shell</a></li></ul>
<div class="md-content animated fadeIn">
<p>2020 年开年不顺2019 新型冠状病毒肺炎爆发,从年三十居家隔离到了正月十五,没想到自己的服务器也”感染“上了病毒 - Kinsing(进程的名字,姑且这样称呼)。</p>
<p></p>
<p>偶然看了看服务器状态,发现 CPU 占用一直保持在 100%上下,有些蹊跷。</p>
<p>难道是我的博客访问量<s>暴增</s>???那是当然不可能的,然后我去看了看<a href="https://github.com/portainer/portainer" target="_blank" rel="noopener">Portainer</a>看了看,果然,</p>
<p></p>
<p>这个随机名称的容器就是 Kinsing 基于 Ubuntu 的容器CPU 占用 100%。</p>
<p></p>
<p>简单看了看容器里面的进程表,第一个运行了一个 shell...</p>
<span class="read-more"><a href="/kinsing-virus/" title="查看全文" class="posttitle">查看全文</a> <b class="iconfont icon-arrow-right- gradient-text"></b></span>
</div>
</div>
</div>
<div class="post" id="post">
<div class="post-cover animated fadeIn" style="
background-image:

View File

@ -63,7 +63,7 @@
<div class="set">
<h1>标签</h1>
<div class="tagcloud">
<a href="/tags/ANU/" style="font-size: 16px; color: #0ed2f7">ANU</a> <a href="/tags/Ada/" style="font-size: 16px; color: #0ed2f7">Ada</a> <a href="/tags/Cpp/" style="font-size: 16px; color: #0ed2f7">Cpp</a> <a href="/tags/Docker/" style="font-size: 16px; color: #0ed2f7">Docker</a> <a href="/tags/Linux/" style="font-size: 16px; color: #0792e6">Linux</a> <a href="/tags/Markdown/" style="font-size: 16px; color: #0ed2f7">Markdown</a> <a href="/tags/Open-Source/" style="font-size: 16px; color: #0792e6">Open-Source</a> <a href="/tags/Others/" style="font-size: 16px; color: #0ed2f7">Others</a> <a href="/tags/Shell/" style="font-size: 16px; color: #0ed2f7">Shell</a> <a href="/tags/Terminal/" style="font-size: 16px; color: #0ed2f7">Terminal</a> <a href="/tags/Windows/" style="font-size: 16px; color: #0052d4">Windows</a>
<a href="/tags/ANU/" style="font-size: 16px; color: #0ed2f7">ANU</a> <a href="/tags/Ada/" style="font-size: 16px; color: #0ed2f7">Ada</a> <a href="/tags/Cpp/" style="font-size: 16px; color: #0ed2f7">Cpp</a> <a href="/tags/Docker/" style="font-size: 16px; color: #0ed2f7">Docker</a> <a href="/tags/Linux/" style="font-size: 16px; color: #057de0">Linux</a> <a href="/tags/Markdown/" style="font-size: 16px; color: #0ed2f7">Markdown</a> <a href="/tags/Open-Source/" style="font-size: 16px; color: #09a7eb">Open-Source</a> <a href="/tags/Others/" style="font-size: 16px; color: #0ed2f7">Others</a> <a href="/tags/Shell/" style="font-size: 16px; color: #0ed2f7">Shell</a> <a href="/tags/Terminal/" style="font-size: 16px; color: #0ed2f7">Terminal</a> <a href="/tags/Windows/" style="font-size: 16px; color: #0052d4">Windows</a>
</div>
</div>

View File

@ -370,7 +370,7 @@ scoop list
</dl>
</div>
<ul>
<li><a href="/">8 <p>文章</p></a></li>
<li><a href="/">9 <p>文章</p></a></li>
<li><a href="/categories">5 <p>分类</p></a></li>
<li><a href="/tags">11 <p>标签</p></a></li>
</ul>

View File

@ -284,7 +284,7 @@ subfigGrid: true
</dl>
</div>
<ul>
<li><a href="/">8 <p>文章</p></a></li>
<li><a href="/">9 <p>文章</p></a></li>
<li><a href="/categories">5 <p>分类</p></a></li>
<li><a href="/tags">11 <p>标签</p></a></li>
</ul>