-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlocal-search.xml
556 lines (267 loc) · 77.1 KB
/
local-search.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
<?xml version="1.0" encoding="utf-8"?>
<search>
<entry>
<title>记录.Docker 实践</title>
<link href="/blog/2021/08/21/%E8%AE%B0%E5%BD%95-Docker_%E5%AE%9E%E8%B7%B5/"/>
<url>/blog/2021/08/21/%E8%AE%B0%E5%BD%95-Docker_%E5%AE%9E%E8%B7%B5/</url>
<content type="html"><![CDATA[<h2 id="更新"><a href="#更新" class="headerlink" title="更新"></a>更新</h2><p>对容器更新的关键在于 <strong>数据卷(Volum)</strong></p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">//拉取最新的镜像</span><br><span class="line">docker pull sonatype/nexus3</span><br><span class="line"></span><br><span class="line">//利用新的镜像重新创建一次容器,记得绑定原数据卷(-v)</span><br><span class="line">docker run -d -p 8081:8081 --name nexus -v nexus-data:/nexus-data sonatype/nexus3</span><br></pre></td></tr></table></figure><h2 id="备份"><a href="#备份" class="headerlink" title="备份"></a>备份</h2><p>下面文章需要重写,参考<a href="https://www.cnblogs.com/wade-luffy/p/6542539.html">Docker 数据管理(数据卷&数据卷容器)</a></p><a href="/blog/2020/06/06/%E6%97%A5%E5%BF%97-Docker_%E5%85%B3%E4%BA%8E%E5%A4%87%E4%BB%BD%E7%9A%84%E4%B8%80%E4%BA%9B%E5%B0%8F%E4%BA%8B/" title="日志.Docker 关于备份的一些小事">日志.Docker 关于备份的一些小事</a>]]></content>
<categories>
<category>攻打 Docker</category>
</categories>
<tags>
<tag>未完待续</tag>
<tag>Docker</tag>
<tag>持续更新</tag>
</tags>
</entry>
<entry>
<title>记录.Docker 的一些入门知识</title>
<link href="/blog/2021/08/15/%E8%AE%B0%E5%BD%95-Docker%E7%9A%84%E4%B8%80%E4%BA%9B%E5%85%A5%E9%97%A8%E7%9F%A5%E8%AF%86/"/>
<url>/blog/2021/08/15/%E8%AE%B0%E5%BD%95-Docker%E7%9A%84%E4%B8%80%E4%BA%9B%E5%85%A5%E9%97%A8%E7%9F%A5%E8%AF%86/</url>
<content type="html"><![CDATA[<h2 id="介绍"><a href="#介绍" class="headerlink" title="介绍"></a>介绍</h2><h3 id="为何需要?"><a href="#为何需要?" class="headerlink" title="为何需要?"></a>为何需要?</h3><p>软件开发和测试最大问题之一:环境配置<br>用户各自计算机之间的环境都不相同,如何保证代码都能跑起来?</p><p>配置的两要素:操作系统的设置、各种库和组件的安装。<br>例如 Python,Java 等,都需要安装以及配置环境变量。<br>如果软件使用了某个老旧的模块,而且与当前环境不兼容(版本问题),就更加麻烦。</p><p><strong>那能不能把 “环境” 都连同一起备份安装了?</strong></p><h3 id="虚拟机:一个独立的实例"><a href="#虚拟机:一个独立的实例" class="headerlink" title="虚拟机:一个独立的实例"></a>虚拟机:一个独立的实例</h3><p>虚拟机(virtual machine)就是带环境安装的一种解决方案。<br>在一个操作系统里面运行另一种操作系统!例:<strong>Window(Linux)</strong></p><p>对于应用程序来说,与真实系统毫无区别;<br>对于底层系统来说,虚拟机就是一系列的普通文件,不需要即可删除,对其他部分毫无影响。</p><h3 id="Linux-容器:用于移动所需"><a href="#Linux-容器:用于移动所需" class="headerlink" title="Linux 容器:用于移动所需"></a>Linux 容器:用于移动所需</h3><p>Docker 属于 Linux 容器的一种封装,提供简单易用的容器使用接口。<br>是目前最流行的 Linux 容器 解决方案。</p><p>Linunx 容器并不是模拟一个系统,而是对进程进行隔离。相当于在外面套了一个保护层,接触到的各种资源都是虚拟的,从而实现与底层系统的隔离。</p><p>Docker 将应用程序和依赖,打包在一个文件(镜像),运行这个文件,就会生成一个容器。在这个容器里运行,就像在物理机上运行一样。</p><p>而且 Docker 提供的接口也非常的简单,可以方便地创建和使用容器,还可以进行版本、复制、分享、修改,就像管理普通的代码一样。<br>例如对其进行修改且保存,作为一个新的镜像。</p><h3 id="对比"><a href="#对比" class="headerlink" title="对比"></a>对比</h3><p>待写,可以参看文章<a href="https://cloud.tencent.com/developer/article/1422761">容器 vs. 虚拟机</a><br><img src="%E8%99%9A%E6%8B%9F%E6%9C%BA%E4%B8%8E%E5%AE%B9%E5%99%A8%E5%AF%B9%E6%AF%94%E6%A6%82%E8%A7%88.png" alt="虚拟机 vs 容器对比概览"></p><h2 id="基础三要素"><a href="#基础三要素" class="headerlink" title="基础三要素"></a>基础三要素</h2><h3 id="镜像"><a href="#镜像" class="headerlink" title="镜像"></a>镜像</h3><p>它就是一个只读的模板,并且带有创建 Docker 容器的指令。<br>通常,一个镜像是基于另一个镜像的,但都会进行一些额外的定制。<br>例如,可以构建一个基于 Ubuntu 的镜像的镜像,但会安装 Apache Web 服务器和各种应用程序等,以及配置程、设置序运行所需要的环境等。</p><p><strong>一个镜像可以创建多个容器。</strong></p><h3 id="容器"><a href="#容器" class="headerlink" title="容器"></a>容器</h3><p>容器时镜像创建的实例。</p><p>每个容器都可以被启动、开始、停止、删除。<br>同时,它们之间又互相隔离,保证应用程序运行期间的安全。</p><p>可以把容器理解为一个 特别精简版 的 Linux ,它包括了 root 用户权限、进程空间、用户空间和网络空间等,<br>然后再加上在它之上的运行程序。<br>例如基于 MySQL 镜像创建了一个容器,容器并不是只有一个 MySQL 程序,而是同样安装运行在容器的 Linux 环境内。</p><h3 id="数据卷"><a href="#数据卷" class="headerlink" title="数据卷"></a>数据卷</h3><p>镜像是由多个文件系统(只读层)叠加而成的。</p><p>当启动一个容器的时候, Docker 会加载只读镜像层并且在其上(镜像栈顶层)添加一个读写层。<br>如果运行中修改了现有的一个已经存在的文件,那该文件就会从下面的 <strong>只读层复制到读写层</strong> ,该文件的只读版本仍然存在,只是已经被读写层中的该文件的副本隐藏。<br>关闭容器,通过镜像重新启动,更改既会消失。</p><p>大多镜像运行时,就算不指定数据卷,也会根据生成一个随机名的数据卷。<br><img src="Nexus_%E4%B8%B4%E6%97%B6%E6%95%B0%E6%8D%AE_%E5%88%9B%E5%BB%BA%E9%95%9C%E5%83%8F.png" alt="Nexus 临时数据 创建镜像"><br><img src="Nexus_%E4%B8%B4%E6%97%B6%E6%95%B0%E6%8D%AE_%E4%B8%B4%E6%97%B6%E6%95%B0%E6%8D%AE%E5%8D%B7.png" alt="Nexus 临时数据 创建数据卷"></p><h2 id="使用"><a href="#使用" class="headerlink" title="使用"></a>使用</h2><a href="#">Post not found: 记录-Docker 实践</a><a href="#">Post not found: 日志-利用_Docker_搭建_Nexus_仓库私服</a><h2 id="参考资料"><a href="#参考资料" class="headerlink" title="参考资料"></a>参考资料</h2><p><a href="https://www.ruanyifeng.com/blog/2018/02/docker-tutorial.html">Docker 入门教程</a><br><a href="https://www.docker.com/resources/what-container">Docker 官方介绍</a><br><a href="https://cloud.tencent.com/developer/article/1422761">容器 vs. 虚拟机</a><br><a href="https://juejin.cn/post/6844903958046048264">Docker 三要素 :镜像、容器和仓库</a><br><a href="https://www.cnblogs.com/wade-luffy/p/6542539.html">Docker 数据管理(数据卷&数据卷容器)</a></p>]]></content>
<categories>
<category>攻打 Docker</category>
</categories>
<tags>
<tag>未完待续</tag>
<tag>Docker</tag>
</tags>
</entry>
<entry>
<title>记录.Hexo 的一些小要求</title>
<link href="/blog/2021/04/23/%E8%AE%B0%E5%BD%95-Hexo_%E7%9A%84%E4%B8%80%E4%BA%9B%E5%B0%8F%E8%A6%81%E6%B1%82/"/>
<url>/blog/2021/04/23/%E8%AE%B0%E5%BD%95-Hexo_%E7%9A%84%E4%B8%80%E4%BA%9B%E5%B0%8F%E8%A6%81%E6%B1%82/</url>
<content type="html"><![CDATA[<h3 id="文章跳转"><a href="#文章跳转" class="headerlink" title="文章跳转"></a>文章跳转</h3><p><code>{% post_link 文章文件名(不要后缀) 文章标题(可选) %}</code><br>例:<a href="/blog/2021/04/23/%E8%AE%B0%E5%BD%95-Hexo_%E7%9A%84%E4%B8%80%E4%BA%9B%E5%B0%8F%E8%A6%81%E6%B1%82/" title="记录.Hexo 的一些小要求">记录.Hexo 的一些小要求</a></p><h3 id="部署时,不渲染某些文件"><a href="#部署时,不渲染某些文件" class="headerlink" title="部署时,不渲染某些文件"></a>部署时,不渲染某些文件</h3><h4 id="不渲染-html"><a href="#不渲染-html" class="headerlink" title="不渲染 .html"></a>不渲染 .html</h4><p>可在文件的最上面加上以下代码</p><figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">---</span><br><span class="line">layout: false</span><br><span class="line">---</span><br></pre></td></tr></table></figure><h4 id="不渲染-md"><a href="#不渲染-md" class="headerlink" title="不渲染 .md"></a>不渲染 .md</h4><p>使用了上面代码虽然不会渲染 .md ,但会转换成为 html 文件。<br>如果想保留 md 原文件,需要在 <code>_config.yml</code> 中找到 <code>skip_render</code> 参数<br><code>skip_render</code> 匹配的位置一般为 <code>source_dir</code> ,默认是在 source 文件夹下</p><figure class="highlight md"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">skip<span class="emphasis">_render:</span></span><br><span class="line"><span class="emphasis"> - "mypage/*" #单文件夹的全部文件</span></span><br><span class="line"><span class="emphasis"> - "mypage/*.md" #单文件夹的指定类型文件</span></span><br><span class="line"><span class="emphasis"> - "mypage/<span class="strong">**" #单文件夹的全部文件以及子目录</span></span></span><br></pre></td></tr></table></figure><h3 id="文章模板配置"><a href="#文章模板配置" class="headerlink" title="文章模板配置"></a>文章模板配置</h3><p>修改 Hexo 项目文件夹中的 <code>scaffolds</code> :<br>文章:<code>post.md</code><br>草稿:<code>draft.md</code></p><p>对应的是 <code>hexo new [layout] <title></code> 中的 layout ,默认是 post,<br>如果在模板中,标题需要空格,需要用引号包起来。</p><p>draft 是 Hexo 中的一种特殊布局,在建立时会保存到 <code>source/_drafts</code> ,默认不会显示在页面中,<br>但可以在执行时加上 <code>--dart</code> 参数,或者把 <code>_config.yml</code> 的 <code>render_drafts</code> 参数设置为:<code>true</code>,<br>用于预览</p><figure class="highlight md"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><span class="line">---</span><br><span class="line">title: {{ title }}</span><br><span class="line">tags:</span><br><span class="line">categories:</span><br><span class="line">description:</span><br><span class="line">date: {{ date }}</span><br><span class="line">---</span><br><span class="line"></span><br><span class="line">点击阅读前文前, 首页能看到的文章的简短描述</span><br><span class="line"></span><br></pre></td></tr></table></figure><h3 id="部署在网站的子目录"><a href="#部署在网站的子目录" class="headerlink" title="部署在网站的子目录"></a>部署在网站的子目录</h3><p>在博客配置文件(<code>_config.yml</code>)中修改:url 和 root<br>例:xxx.github.io/blog<br>则需设置</p><figure class="highlight md"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">url: http://example.com/blog</span><br><span class="line">root: /blog/</span><br></pre></td></tr></table></figure><h3 id="Hello"><a href="#Hello" class="headerlink" title="Hello"></a>Hello</h3>]]></content>
<categories>
<category>Hexo</category>
</categories>
<tags>
<tag>博客</tag>
<tag>持续更新</tag>
<tag>Hexo</tag>
</tags>
</entry>
<entry>
<title>记录.WSL2 端口映射</title>
<link href="/blog/2021/04/08/%E8%AE%B0%E5%BD%95-WSL2_%E7%AB%AF%E5%8F%A3%E6%98%A0%E5%B0%84/"/>
<url>/blog/2021/04/08/%E8%AE%B0%E5%BD%95-WSL2_%E7%AB%AF%E5%8F%A3%E6%98%A0%E5%B0%84/</url>
<content type="html"><![CDATA[<h3 id="问题"><a href="#问题" class="headerlink" title="问题"></a>问题</h3><p>在使用 Dokcer 搭建 Nexus3 私有仓库的时候,发现 WSL2 无法正常端口映射</p><p>虽然名为 WSL ( = 适用 Linux 的 Windows 子系统),但它却不是和 WSL1、Interix 一样,属于子系统。</p><p>WSL2 是基于 Hyper-V 的轻型虚拟机,具有自己独立的网络接口、IP地址等。</p>]]></content>
<categories>
<category>Windows</category>
</categories>
<tags>
<tag>未完待续</tag>
<tag>Docker</tag>
<tag>WSL2</tag>
<tag>虚拟机</tag>
</tags>
</entry>
<entry>
<title>文章.接待光猫那些事</title>
<link href="/blog/2020/08/24/%E6%96%87%E7%AB%A0-%E6%8E%A5%E5%BE%85%E5%85%89%E7%8C%AB%E9%82%A3%E4%BA%9B%E4%BA%8B/"/>
<url>/blog/2020/08/24/%E6%96%87%E7%AB%A0-%E6%8E%A5%E5%BE%85%E5%85%89%E7%8C%AB%E9%82%A3%E4%BA%9B%E4%BA%8B/</url>
<content type="html"><![CDATA[<p>路由器接力三部曲</p><ol><li>获得管理员(超级)账户密码</li><li>截图网络设置(一定要知道 VLAN ID),并设置网络桥接路由器</li><li>路由器拨号上网</li></ol><p>远程管理 -> 认证 -> Password:k282360892t</p><p>设置后无法进入光猫后台</p><ol><li>进入 PC 的 “Internet” 协议版本 4 (TCP/IPv4)” 属性设置</li><li>IP地址:根据网关修改为接近的(192.168.100.100、192.168.1.1)<br>子网掩码:255.255.255.0<br>默认网关:光猫后台地址(192.168.100.1、192.168.1.1 等)</li></ol>]]></content>
<tags>
<tag>未完待续</tag>
<tag>网络</tag>
<tag>配置</tag>
</tags>
</entry>
<entry>
<title>记录.Java_异常见闻录</title>
<link href="/blog/2020/07/08/%E8%AE%B0%E5%BD%95-%E5%BC%82%E5%B8%B8%E8%A7%81%E9%97%BB%E5%BD%95%EF%BC%88Java%EF%BC%89/"/>
<url>/blog/2020/07/08/%E8%AE%B0%E5%BD%95-%E5%BC%82%E5%B8%B8%E8%A7%81%E9%97%BB%E5%BD%95%EF%BC%88Java%EF%BC%89/</url>
<content type="html"><![CDATA[<h4 id="java-xxx-gt-找不到类"><a href="#java-xxx-gt-找不到类" class="headerlink" title="java xxx -> 找不到类"></a>java xxx -> 找不到类</h4><p>Java 执行 class 文件时,对 package 是强依赖。<br>以当前路径为基础,结合 package 的包路径转换为文件路径以搜索 class 。<br>同理,如果代码无指定 package ,则运行成功。</p>]]></content>
<categories>
<category>攻打 Java</category>
</categories>
<tags>
<tag>持续更新</tag>
<tag>Java</tag>
</tags>
</entry>
<entry>
<title>备份.一些好用的软件或工具</title>
<link href="/blog/2020/06/11/%E5%A4%87%E4%BB%BD-%E4%B8%80%E4%BA%9B%E5%A5%BD%E7%94%A8%E7%9A%84%E8%BD%AF%E4%BB%B6%E6%88%96%E5%B7%A5%E5%85%B7/"/>
<url>/blog/2020/06/11/%E5%A4%87%E4%BB%BD-%E4%B8%80%E4%BA%9B%E5%A5%BD%E7%94%A8%E7%9A%84%E8%BD%AF%E4%BB%B6%E6%88%96%E5%B7%A5%E5%85%B7/</url>
<content type="html"><![CDATA[<table><thead><tr><th>链接</th><th>作用</th><th>平台限制</th></tr></thead><tbody><tr><td><a href="https://github.com/aria2/aria2">Aira2</a> or <a href="https://github.com/mayswind/AriaNg">AriaNg</a></td><td>一个多平台使用的下载工具与 web 前台,功能齐全,插件也多,够顶。</td><td></td></tr><tr><td><a href="https://github.com/imDema/FreeMove">FreeMove</a></td><td>可视化创建符号链接的小工具</td><td>Windows</td></tr></tbody></table>]]></content>
<categories>
<category>备忘</category>
</categories>
</entry>
<entry>
<title>日志.移动的服务器:Linux Deploy</title>
<link href="/blog/2020/06/11/%E6%97%A5%E5%BF%97-%E7%A7%BB%E5%8A%A8%E7%9A%84%E6%9C%8D%E5%8A%A1%E5%99%A8%EF%BC%9ALinux_Deploy/"/>
<url>/blog/2020/06/11/%E6%97%A5%E5%BF%97-%E7%A7%BB%E5%8A%A8%E7%9A%84%E6%9C%8D%E5%8A%A1%E5%99%A8%EF%BC%9ALinux_Deploy/</url>
<content type="html"><![CDATA[<h3 id="环境记录(一定要-Root-)"><a href="#环境记录(一定要-Root-)" class="headerlink" title="环境记录(一定要 Root !!!)"></a>环境记录(一定要 Root !!!)</h3><p>文章于 2020.06.27 记录,仅供于参考,不为任何意外负责!👌<br>| - | - |<br>| — | — |<br>| 移动设备 | 红米Note 4x |<br>| 魔趣版本 | MK90.0-mido-200614-RELEASE |<br>| 安卓系统 | Android 9 |<br>| <a href="https://play.google.com/store/apps/details?id=ru.meefik.linuxdeploy&hl=en_US">Linux Deploy</a> | 2.6.0 |<br>| <a href="https://play.google.com/store/apps/details?id=stericson.busybox&hl=en_US">BusyBox</a> | 1.30.1 |</p><h3 id="安装配置"><a href="#安装配置" class="headerlink" title="安装配置"></a>安装配置</h3><h4 id="BusyBox-配置安装"><a href="#BusyBox-配置安装" class="headerlink" title="BusyBox 配置安装"></a>BusyBox 配置安装</h4><p>BusyBox 就像一个工具箱,集成压缩了 Linux 的许多工具和命令,也包含了 Android 系统的自带的 shell。 </p><ul><li>软件安装<ol><li>从 <a href="https://play.google.com/store/apps">Google Play</a> 搜索安装;</li><li>安装路径修改为 <strong><code>/system/xbin</code></strong> ;</li><li>点击安装即可。</li></ol></li><li>Magisk 模块安装<ol><li>直接搜索安装重启即可。</li></ol></li></ul><div class="group-image-container"><div class="group-image-row"><div class="group-image-wrap"><img src="BusyBox_%E8%BD%AF%E4%BB%B6%E8%AE%BE%E7%BD%AE.jpg" alt="BusyBox 软件设置"></div><div class="group-image-wrap"><img src="BusyBox_Magisk_%E6%A8%A1%E5%9D%97.jpg" alt="BusyBox Magisk 模块"></div></div></div> <h4 id="Linux-Deploy-配置安装"><a href="#Linux-Deploy-配置安装" class="headerlink" title="Linux Deploy 配置安装"></a>Linux Deploy 配置安装</h4><h5 id="1-软件配置"><a href="#1-软件配置" class="headerlink" title="1. 软件配置"></a>1. 软件配置</h5><p><strong>菜单栏 -> 设置</strong> </p><div class="group-image-container"><div class="group-image-row"><div class="group-image-wrap"><img src="Linux_Deploy_%E4%B8%BB%E9%A1%B5.png" alt="Linux Deploy 主页"></div><div class="group-image-wrap"><img src="Linux_Deploy_%E4%B8%BB%E9%A1%B5%E8%8F%9C%E5%8D%95%E6%A0%8F.jpg" alt="Linux Deploy 主页菜单栏"></div><div class="group-image-wrap"><img src="Linux_Deploy_%E8%AE%BE%E7%BD%AE.jpg" alt="Linux Deploy 设置"></div></div></div> <p>需要开启或设置的选项</p><ol><li>锁定 Wi-Fi </li><li>CPU 唤醒</li><li>联网更新</li><li>PATH 变量设置为:<code>/system/xbin</code> ,用于关联 BusyBox</li><li>点击”更新环境”</li></ol><h5 id="2-安装配置"><a href="#2-安装配置" class="headerlink" title="2. 安装配置"></a>2. 安装配置</h5><p><strong>菜单栏 -> 配置文件</strong>,<br>根据需要来修改名字或者创建一个新的 <strong>配置文件</strong> ,<br>回到主页,对配置文件进行设置。 </p><table><thead><tr><th>修改项</th><th>下面的是我个人的设置,可以根据需要修改</th></tr></thead><tbody><tr><td>发行版</td><td>CentOS</td></tr><tr><td>架构</td><td>aarch64 <br> 根据自己手机架构选择,可以使用 <a href="https://play.google.com/store/apps/details?id=com.finalwire.aida64&hl=en_US">AIDA64</a> 查询</td></tr><tr><td>源地址</td><td><a href="http://mirrors.aliyun.com/centos-altarch/">http://mirrors.aliyun.com/centos-altarch/</a> <br> 修改为阿里源</td></tr><tr><td>安装类型</td><td>分区 <br> 我直接将 sd卡 用于存放系统。可以根据 <a href="#%E5%AE%89%E8%A3%85%E7%B1%BB%E5%9E%8B%E5%90%84%E8%87%AA%E7%9A%84%E5%8C%BA%E5%88%AB%E5%92%8C%E4%BC%98%E7%BC%BA%E7%82%B9">安装类型各自的区别和优缺点</a> 选择</td></tr><tr><td>安装路径</td><td><code>/dev/block/mmcblkXpY</code></td></tr></tbody></table><h3 id="系统"><a href="#系统" class="headerlink" title="系统"></a>系统</h3><p>安装使用暂时不记录,先记录一些坑<br>参考文章:<a href="https://www.jianshu.com/p/fa32285672fc">https://www.jianshu.com/p/fa32285672fc</a></p><h3 id="常见问题解决"><a href="#常见问题解决" class="headerlink" title="常见问题解决"></a>常见问题解决</h3><h4 id="MySQL-无法正常启动"><a href="#MySQL-无法正常启动" class="headerlink" title="MySQL 无法正常启动"></a>MySQL 无法正常启动</h4><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line"># 打开 group</span><br><span class="line">vim /etc/group</span><br><span class="line"></span><br><span class="line"># 找到 aid_inet ,在后面添加 mysql</span><br><span class="line">更新前:aid_inet:x:3003:root</span><br><span class="line">更新后:aid_inet:x:3003:android,mysql</span><br></pre></td></tr></table></figure><h4 id="安装类型各自的区别和优缺点"><a href="#安装类型各自的区别和优缺点" class="headerlink" title="安装类型各自的区别和优缺点"></a>安装类型各自的区别和优缺点</h4><h5 id="镜像文件"><a href="#镜像文件" class="headerlink" title="镜像文件"></a>镜像文件</h5><p>安装到一个镜像文件(虚拟磁盘)中。<br>安装路径:镜像文件的绝对路径。默认:<code>${EXTERNAL_STORAGE}/linux.img</code></p><h5 id="目录"><a href="#目录" class="headerlink" title="目录"></a>目录</h5><h5 id="分区"><a href="#分区" class="headerlink" title="分区"></a>分区</h5><h5 id="RAM"><a href="#RAM" class="headerlink" title="RAM"></a>RAM</h5><h3 id="参考"><a href="#参考" class="headerlink" title="参考"></a>参考</h3><ul><li><a href="https://www.jianshu.com/p/fa32285672fc">Linux deploy 超详细入门教程</a></li><li></li></ul>]]></content>
<categories>
<category>攻打 服务器</category>
</categories>
<tags>
<tag>未完待续</tag>
<tag>Android</tag>
<tag>Linux</tag>
<tag>服务器</tag>
</tags>
</entry>
<entry>
<title>日志.Docker 关于备份的一些小事</title>
<link href="/blog/2020/06/06/%E6%97%A5%E5%BF%97-Docker_%E5%85%B3%E4%BA%8E%E5%A4%87%E4%BB%BD%E7%9A%84%E4%B8%80%E4%BA%9B%E5%B0%8F%E4%BA%8B/"/>
<url>/blog/2020/06/06/%E6%97%A5%E5%BF%97-Docker_%E5%85%B3%E4%BA%8E%E5%A4%87%E4%BB%BD%E7%9A%84%E4%B8%80%E4%BA%9B%E5%B0%8F%E4%BA%8B/</url>
<content type="html"><![CDATA[<h2 id="常用指令和关系"><a href="#常用指令和关系" class="headerlink" title="常用指令和关系"></a>常用指令和关系</h2><p><img src="Docker_%E5%B8%B8%E7%94%A8%E6%8C%87%E4%BB%A4%E5%92%8C%E5%85%B3%E7%B3%BB.png" alt="Docker 常用指令和关系"></p><h2 id="镜像(Image)"><a href="#镜像(Image)" class="headerlink" title="镜像(Image)"></a>镜像(Image)</h2><p>容器的基石(环境模板),本身只是个层叠的只读文件系统。</p><h3 id="仓库"><a href="#仓库" class="headerlink" title="仓库"></a>仓库</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 上传</span></span><br><span class="line">docker push user/imageName</span><br><span class="line"></span><br><span class="line"><span class="comment"># 拉取</span></span><br><span class="line">docker pull user/imageName</span><br></pre></td></tr></table></figure><h3 id="tar-包"><a href="#tar-包" class="headerlink" title="tar 包"></a>tar 包</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 保存,fileName 前面记得加路径,不然默认存当前目录</span></span><br><span class="line">docker save -o \xxx\xx\fileName user/imageName</span><br><span class="line"></span><br><span class="line"><span class="comment"># 载入与其简写</span></span><br><span class="line">docker load --input fileName</span><br><span class="line">docker load < fileName</span><br></pre></td></tr></table></figure><h2 id="容器(Container)"><a href="#容器(Container)" class="headerlink" title="容器(Container)"></a>容器(Container)</h2><p>类似一个轻量级的沙盒。当沙盒结束时,所作过的修改都会消失。<br>镜像是只读的,容器从镜像启动,只是在镜像的上层创建了一个可写层,而镜像本身没有变化。</p><h3 id="备份"><a href="#备份" class="headerlink" title="备份"></a>备份</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 创建新的镜像后,备份镜像即可</span></span><br><span class="line">docker commit containerId user/imageName:version</span><br></pre></td></tr></table></figure><h2 id="数据卷"><a href="#数据卷" class="headerlink" title="数据卷"></a>数据卷</h2><p>数据卷 ≠ 数据卷容器</p><ul><li>数据卷:<ol><li>可供容器使用的特殊目录。可是通过 <code>voluem create</code> 创建的文件,或者主机的目录或者文件。</li><li>数据的修改会立马生效,无论是容器内操作还是本地操作。</li><li>数据卷的更新,不会影响镜像。</li><li>会一直存在,知道没有容器使用。</li></ol></li><li>数据卷容器:<ol><li>需要在多个容器之间共享一些持续更新的数据。</li><li>一个正常的容器,存在的目的就是提供数据卷给其他数据,因为数据卷无法直接被多个容器挂载。</li></ol></li></ul><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 列出所有数据卷</span></span><br><span class="line">docker volume ls</span><br><span class="line"></span><br><span class="line"><span class="comment"># 命令解析</span></span><br><span class="line"><span class="comment"># --volume-from 从指定的容器挂载数据卷</span></span><br><span class="line"><span class="comment"># -v 将主机目录挂载到容器内部目录</span></span><br><span class="line"><span class="comment"># tar 将数据卷备份或恢复到主机目录</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># 变量名</span></span><br><span class="line"><span class="comment"># containerName 数据卷容器名</span></span><br><span class="line"><span class="comment"># imagesName 启动镜像</span></span><br><span class="line"><span class="comment"># localDir 被挂载的本地路径</span></span><br><span class="line"><span class="comment"># containerDir 挂载到容器的路径</span></span><br><span class="line"><span class="comment"># volumeDir 数据卷的挂载目录</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># 备份</span></span><br><span class="line">docker run --volumes-from containerName -v localDir:containerDir imagesName tar cvf /containerDir/backup.tar /volumeDir</span><br><span class="line"></span><br><span class="line"><span class="comment"># 恢复</span></span><br><span class="line">docker run --volumes-from containerName -v localDir:containerDir imagesName tar xvf /containerDir/backup.tar</span><br></pre></td></tr></table></figure><h3 id="参考资料"><a href="#参考资料" class="headerlink" title="参考资料"></a>参考资料</h3><ul><li><a href="https://chetaofeng.github.io/2018/10/18/%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF-docker%E5%85%A5%E9%97%A8/">Docker 入门</a></li><li><a href="https://yifdu.github.io/2019/06/10/%E8%8F%9C%E9%B8%9F%E5%AD%A6docker%EF%BC%88%E4%B8%80%EF%BC%89/">菜鸟学Docker(一)</a></li><li><a href="https://www.w3cschool.cn/reqsgr/j84s2ozt.html">Docker 备份、恢复、迁移数据卷</a></li></ul>]]></content>
<categories>
<category>攻打 Docker</category>
</categories>
<tags>
<tag>日志</tag>
<tag>Docker</tag>
<tag>备份</tag>
</tags>
</entry>
<entry>
<title>记录.搞个服务器来干啥?</title>
<link href="/blog/2020/06/05/%E8%AE%B0%E5%BD%95-%E6%90%9E%E4%B8%AA%E6%9C%8D%E5%8A%A1%E5%99%A8%E6%9D%A5%E5%B9%B2%E5%95%A5%EF%BC%9F/"/>
<url>/blog/2020/06/05/%E8%AE%B0%E5%BD%95-%E6%90%9E%E4%B8%AA%E6%9C%8D%E5%8A%A1%E5%99%A8%E6%9D%A5%E5%B9%B2%E5%95%A5%EF%BC%9F/</url>
<content type="html"><![CDATA[<h3 id="说明"><a href="#说明" class="headerlink" title="说明"></a>说明</h3><p>本文章主要提供于,当拥有了闲置的服务器的时候,能拿来做什么,操作教程基本通用,因为大多的运行环境都是基于 <code>Linux</code> 。<br>而且服务器不单单指电脑,腾讯云,阿里云等。手机也可以作为一个服务器,详细可以了解<br><a href="http://www.ruanyifeng.com/blog/2019/07/termux-tutorial.html">Termux</a><br>和 <a href="https://github.com/meefik/linuxdeploy">Linux Deploy</a> 。</p><h3 id="我的服务器环境"><a href="#我的服务器环境" class="headerlink" title="我的服务器环境"></a>我的服务器环境</h3><table><thead><tr><th>-</th><th>-</th><th>-</th></tr></thead><tbody><tr><td>服务器</td><td>腾讯云服务器</td><td>CPU:单核, <br>内存:1G, <br>带宽:1M</td></tr><tr><td>系统</td><td>CentOS 7.6 64位</td><td></td></tr><tr><td>管理面板</td><td><a href="https://www.bt.cn/">宝塔</a></td><td>简单粗暴的后台管理面板, <br>如果对 <code>Linux</code> 熟悉,不建议安装面板,这样会省下很多的资源占用。</td></tr></tbody></table><hr><h3 id="个人网站"><a href="#个人网站" class="headerlink" title="个人网站"></a>个人网站</h3><h4 id="作用"><a href="#作用" class="headerlink" title="作用"></a>作用</h4><p>放一些自己的小作品,或者利用 <strong><a href="https://hexo.io/zh-cn/">Hexo</a></strong> 搭建个博客。</p><h4 id="注意事项"><a href="#注意事项" class="headerlink" title="注意事项"></a>注意事项</h4><ol><li>带宽,如果太小,加载会比较慢。</li><li>端口,例 Hexo,默认显示在端口 <strong>4000</strong>,而服务器平常的开放的网站访问端口是 <strong>80</strong> ,需要反向代理或者修改。</li></ol><h4 id="我的操作(已放弃)"><a href="#我的操作(已放弃)" class="headerlink" title="我的操作(已放弃)"></a>我的操作(已放弃)</h4><p>服务器的带宽太小(1M),一些文章的图片多的话,加载过慢。<br>可以将博客搭建在 <strong>Github</strong> ,<br>然后将服务器重定向到真实地址,例:<a href="https://blog.llxbh.xyz/">https://blog.llxbh.xyz/</a></p><hr><h3 id="Nexus-仓库"><a href="#Nexus-仓库" class="headerlink" title="Nexus 仓库"></a>Nexus 仓库</h3><h4 id="作用-1"><a href="#作用-1" class="headerlink" title="作用"></a>作用</h4><p>用于开发时的依赖加速,可以避免 Github 或者网络罢工的时候,无法下载下来依赖。<br>而且 Nexus 设置好代理后,会先检查仓库,没有这个文件才远程下载给用户。<br>搭建可以参考文章:<a href="#">Post not found: 日志-利用_Docker_搭建_Nexus_仓库私服 利用 Docker 搭建 Nexus</a></p><h4 id="注意事项-1"><a href="#注意事项-1" class="headerlink" title="注意事项"></a>注意事项</h4><ol><li>管理,Nexus 一般用于内部局域网使用,不适合公开。</li><li>带宽,如果带宽太小,使用的人过多的话,严重影响下载速度。</li><li>代替品,单纯想解决依赖下载慢问题,可以用国内公开仓库,例:<a href="https://maven.aliyun.com/mvn/view">阿里 Mavne 镜像</a></li></ol><h4 id="我的操作(已放弃)-1"><a href="#我的操作(已放弃)-1" class="headerlink" title="我的操作(已放弃)"></a>我的操作(已放弃)</h4><p>带宽太小导致下载依赖回本地的速度过慢,不如直接用阿里云公开仓库。后来使用了闲置手机搞了个服务器,电脑直接在局域网内进行访问😜。 </p><hr><h3 id="离线-远程-下载服务"><a href="#离线-远程-下载服务" class="headerlink" title="离线/远程 下载服务"></a>离线/远程 下载服务</h3><h4 id="作用-2"><a href="#作用-2" class="headerlink" title="作用"></a>作用</h4><ol><li>最简单,最直接 -> 用来下载学习资料👍</li><li>稀缺资源下载慢的时候不用一直挂着,可以由服务器下载完了再取回来。</li></ol><h4 id="注意事项-2"><a href="#注意事项-2" class="headerlink" title="注意事项"></a>注意事项</h4><ol><li>版权,如果使用 <strong>BT</strong> 下载了侵犯版权的文件,有一定的可能性会被服务商封停。</li><li>带宽,毕竟还是要把东西下载回本地的,如果带宽小,拉取速度慢,不如直接本地下载好。</li><li>适用资源,适用于下载冷门资源,下载速度过慢(几十kb/s)的类型,当然,你带宽大当我没说😂。</li><li>管理,随意公开使用,容易会被别人使用,建议建立一定门槛隔绝或者登录系统。</li></ol><h4 id="我的操作"><a href="#我的操作" class="headerlink" title="我的操作"></a>我的操作</h4><ul><li><a href="https://github.com/aria2/aria2">aria2</a></li><li><a href="">dd</a></li></ul><p>选了个功能比较全面的,而且多个平台都有支持。<br>缺点也就没有 UI 界面,配置设置得修改文件,比较麻烦点,不过网上有很多懒人包,比直接安装一个 *雷 麻烦不了多少。 </p><p>ContOS</p><hr>]]></content>
<categories>
<category>攻打 服务器</category>
</categories>
<tags>
<tag>未完待续</tag>
<tag>Linux</tag>
<tag>服务器</tag>
<tag>长期更新</tag>
</tags>
</entry>
<entry>
<title>备忘.文章分类</title>
<link href="/blog/2020/05/23/%E5%A4%87%E5%BF%98-%E6%96%87%E7%AB%A0%E5%88%86%E7%B1%BB/"/>
<url>/blog/2020/05/23/%E5%A4%87%E5%BF%98-%E6%96%87%E7%AB%A0%E5%88%86%E7%B1%BB/</url>
<content type="html"><![CDATA[<table><thead><tr><th>文章分类</th><th>说明</th></tr></thead><tbody><tr><td>备忘</td><td>单纯的一些乱七八糟的备份</td></tr><tr><td>记录</td><td>日常问题记录,一般都持续更新的</td></tr><tr><td>配置</td><td>记录一些常用的配置,或者用着比较舒服的</td></tr><tr><td>日志</td><td>完成某些事的记录,备用和参考</td></tr><tr><td>文章</td><td>学习记录思考等…</td></tr></tbody></table>]]></content>
<categories>
<category>备忘</category>
</categories>
</entry>
<entry>
<title>文章.BT or 磁力链接 的一些事</title>
<link href="/blog/2020/05/23/%E6%96%87%E7%AB%A0-BT_or_%E7%A3%81%E5%8A%9B%E9%93%BE%E6%8E%A5_%E7%9A%84%E4%B8%80%E4%BA%9B%E4%BA%8B/"/>
<url>/blog/2020/05/23/%E6%96%87%E7%AB%A0-BT_or_%E7%A3%81%E5%8A%9B%E9%93%BE%E6%8E%A5_%E7%9A%84%E4%B8%80%E4%BA%9B%E4%BA%8B/</url>
<content type="html"><![CDATA[<h3 id="有关下载的一些协议"><a href="#有关下载的一些协议" class="headerlink" title="有关下载的一些协议"></a>有关下载的一些协议</h3><table><thead><tr><th>网络协议</th><th>作用</th></tr></thead><tbody><tr><td><a href="https://baike.baidu.com/item/http?fromtitle=%E8%B6%85%E6%96%87%E6%9C%AC%E4%BC%A0%E8%BE%93%E5%8D%8F%E8%AE%AE">HTTP(超文本传输协议)</a>/ HTTPS</td><td>将文件放到服务器上,然后由服务器传送到不同的用户机器上,称为 Client–Server Model 简称 C/S 模式,或者叫一对多模式。<br> 服务器的上传速度决定了总下载速度。</td></tr><tr><td><a href="https://baike.baidu.com/item/ftp/13839">FTP(文件传输协议)</a>/ SFTP</td><td>和 HTTP 一样,也是一对多。<br> 不过<strong>需要用户名和密码</strong>,但大多数的 FTP 下载站都会采用 <strong>Anonymous FTP</strong> 用来跳过验证。</td></tr><tr><td><a href="https://baike.baidu.com/item/BitTorrent">BitTorrent</a></td><td>一种内容分发协议,依赖于 <a href="https://baike.baidu.com/item/%E5%AF%B9%E7%AD%89%E7%BD%91%E7%BB%9C">P2P</a> 。<br> 每一个下载者都将已下载的数据提供给其他下载者下载。</td></tr></tbody></table><hr><h3 id="吸血雷是啥?"><a href="#吸血雷是啥?" class="headerlink" title="吸血雷是啥?"></a>吸血雷是啥?</h3><h4 id="有啥区别?"><a href="#有啥区别?" class="headerlink" title="有啥区别?"></a>有啥区别?</h4><table><thead><tr><th></th><th>BT</th><th>磁力</th></tr></thead><tbody><tr><td>下载资源</td><td>P2P</td><td>P2P</td></tr><tr><td>寻找资源</td><td>追踪服务器、负责引导</td><td>分散索引、接力路由</td></tr><tr><td>包含信息</td><td>文件的名字、大小、<br> 分块后的块文件大小、哈希值 <br> 以及 Tracker 服务器地址。</td><td></td></tr><tr><td>关键</td><td>Tracker 服务器,通过联系它而知道谁有资源</td><td></td></tr></tbody></table><p>它们理解起来比较复杂,不过已有前人做了非常生动的总结</p><ol><li><a href="https://www.bilibili.com/video/BV1R4411w7f3">【回形针PaperClip】别再问我什么是 BT 种子</a></li><li><a href="https://www.bilibili.com/video/av34370450">【万物4分钟】磁力下载是什么原理?跟用种子下载的区别大不大?</a></li></ol><hr><h3 id="又有啥好的下载器?"><a href="#又有啥好的下载器?" class="headerlink" title="又有啥好的下载器?"></a>又有啥好的下载器?</h3><h4 id="前排提示!"><a href="#前排提示!" class="headerlink" title="前排提示!"></a>前排提示!</h4><p>Aria2 比较折腾!!!<br>想直接方便点的,可以考虑 <a href="https://www.qbittorrent.org/">qBittorrent</a> 和 <a href="https://www.freedownloadmanager.org/">FDM</a> ,都是很不错的替代品。</p><h4 id="Windows-篇"><a href="#Windows-篇" class="headerlink" title="Windows 篇"></a>Windows 篇</h4><h4 id="Linux-篇"><a href="#Linux-篇" class="headerlink" title="Linux 篇"></a>Linux 篇</h4><ul><li>操作系统:CentOS 7 <figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"># 安装</span><br><span class="line">yum install aria2</span><br><span class="line"></span><br><span class="line"># 查看版本信息</span><br><span class="line">aria2c -v</span><br></pre></td></tr></table></figure></li></ul><hr><h3 id="一些下载的问题解决"><a href="#一些下载的问题解决" class="headerlink" title="一些下载的问题解决"></a>一些下载的问题解决</h3><h4 id="下载太慢或者根本不动怎么办?"><a href="#下载太慢或者根本不动怎么办?" class="headerlink" title="下载太慢或者根本不动怎么办?"></a>下载太慢或者根本不动怎么办?</h4><ol><li>触发了“反吸血”,P2P软件检测到了特定用户的吸血行为或者吸血软件时,自动对这些用户 进行了降权处理。<br>最简单最直接的表现就是,你上传速度低的话,下载也高不到哪。<br>建议不要限制上传,实在不满意被上传也不要限制太狠(直接来10kb,1kb等),这种行为和吸血雷没啥两样。</li><li>资源冷门,下载的人少。建议换个较近时间发布的种子尝试一下。</li><li>服务器都在国外,尝试挂载代理连接试试。</li><li>种子提供的 Tracker 服务太少(或者被封了)。<br>可以在 Github 上找些 Tracker 服务器分享项目,根据操作添加到下载器。<br>自用关注的一些项目:<a href="https://github.com/XIU2/TrackersListCollection">XIU2/TrackersListCollection</a>、<a href="https://github.com/ngosang/trackerslist">ngosang/trackerslist</a></li></ol><h4 id="老是卡在-99-怎么办?"><a href="#老是卡在-99-怎么办?" class="headerlink" title="老是卡在 99% 怎么办?"></a>老是卡在 99% 怎么办?</h4><ol><li>大多时候处于最后完成时的校验过程中,发现个别块有问题。<br>可以尝试修改后缀,强行结束。例如迅雷一般会在文件添加后缀 <code>xxx.xltd</code> ,尝试删除 <code>.xltd</code> 是否可以正常运行。</li><li>BT 种子内拥有多个文件,某个文件无法下载。<br>如包含视频和字幕,字幕导致开在 99% ,尝试取消勾选,另寻字幕下载。</li></ol><h4 id="为啥种子环境这么差?"><a href="#为啥种子环境这么差?" class="headerlink" title="为啥种子环境这么差?"></a>为啥种子环境这么差?</h4><ol><li>??????大多人没有自己的公网 ip ,会经历 <a href="https://baike.baidu.com/item/nat/320024">NAT</a> ,Tracker 服务器没有实时变更拥有资源的用户 ip ,只能依靠少了拥有公网 ip 的用户提供下载的主要速度。</li><li>奸商运营商的上传下载速度不对等。</li><li>限制 BT ,BT 导致盗版泛滥。有兴趣可以自行了解“海盗船”。<br>文章:<a href="https://www.zhihu.com/question/20060329/answer/815485162">海盗湾是一个什么样的网站?</a><br>纪录片:<a href="https://www.bilibili.com/video/av33222732">【熟肉】瑞典《现实生活中的海盗湾 TPB AFK: The Pirate Bay Away from Keyboard (2013)》</a></li></ol><hr><h3 id="参考资料"><a href="#参考资料" class="headerlink" title="参考资料"></a>参考资料</h3><ul><li><a href="https://zhuanlan.zhihu.com/p/85652893">求求你,别再问你的种子磁力为什么下不动了!</a></li></ul>]]></content>
<tags>
<tag>未完待续</tag>
<tag>文章</tag>
<tag>BitTorrent</tag>
<tag>Aria2</tag>
</tags>
</entry>
<entry>
<title>文章.Android 项目框架搭建</title>
<link href="/blog/2020/05/13/%E6%96%87%E7%AB%A0-Android_%E9%A1%B9%E7%9B%AE%E6%A1%86%E6%9E%B6%E6%90%AD%E5%BB%BA/"/>
<url>/blog/2020/05/13/%E6%96%87%E7%AB%A0-Android_%E9%A1%B9%E7%9B%AE%E6%A1%86%E6%9E%B6%E6%90%AD%E5%BB%BA/</url>
<content type="html"><![CDATA[<h3 id="Navigation"><a href="#Navigation" class="headerlink" title="Navigation"></a>Navigation</h3><h4 id="解决目标"><a href="#解决目标" class="headerlink" title="解决目标"></a>解决目标</h4><ol><li>通过声明式编程,来确保 “应用内导航” 的一致性。</li><li>通过可视化编程,来直观地反映页面的路由关系。</li><li>通过抽象,来整合 Activity 和 Fragment 的路由跳转代码。</li></ol><h5 id="一致性?"><a href="#一致性?" class="headerlink" title="一致性?"></a>一致性?</h5><p>例如一个软件,拥有多个 <strong>源Fragment</strong>,当跳转到</p>]]></content>
<categories>
<category>攻打 Android</category>
</categories>
<tags>
<tag>未完待续</tag>
<tag>Android</tag>
</tags>
</entry>
<entry>
<title>配置.Android Studio</title>
<link href="/blog/2020/05/12/%E9%85%8D%E7%BD%AE-Android_Studio/"/>
<url>/blog/2020/05/12/%E9%85%8D%E7%BD%AE-Android_Studio/</url>
<content type="html"><![CDATA[<h2 id="介绍"><a href="#介绍" class="headerlink" title="介绍"></a>介绍</h2><p>只添加了我自己觉得舒服的配置,大多修改比较大的文件目录(例:sdk,模拟器)的存放位置<br>各种修改会尽量附上官方文档的说明和地址,本文章只做参考</p><h2 id="环境变量"><a href="#环境变量" class="headerlink" title="环境变量"></a>环境变量</h2><a href="/blog/2020/05/12/%E9%85%8D%E7%BD%AE-Java%EF%BC%88Win%EF%BC%89/" title="JDK">JDK</a> 可不配置,Studio 会有内置供于使用,<p>若设置了 <code>JAVA_HOME</code> ,会提醒多个 <strong>JDK</strong> 会影响性能,<br>请务必通过在设置页面设置 JDK 为同一个,或者直接通过 <code>STUDIO_JDK</code> 配置。<br>变量<sup id="fnref:1" class="footnote-ref"><a href="#fn:1" rel="footnote"><span class="hint--top hint--rounded" aria-label="环境变量:变量参考 ">[1]</span></a></sup>有很多,这里只列出了我在使用,并建议设置的(!),也会让在重装 Studio 的时候省下很多功夫。</p><h3 id="SDK"><a href="#SDK" class="headerlink" title="SDK"></a>SDK</h3><table><thead><tr><th>变量名</th><th>默认路径</th><th>作用</th></tr></thead><tbody><tr><td>!<code>ANDROID_SDK_ROOT</code></td><td>sdk 的绝对路径,无默认值</td><td>设置 SDK 安装目录的路径,<code>ANDROID_HOME</code> 也指向 SDK 安装目录,但已弃用。</td></tr></tbody></table><h3 id="Studio-环境变量"><a href="#Studio-环境变量" class="headerlink" title="Studio 环境变量"></a>Studio 环境变量</h3><table><thead><tr><th>变量名</th><th>默认路径</th><th>作用</th></tr></thead><tbody><tr><td><del><code>STUDIO_VM_OPTIONS</code></del></td><td>-</td><td>设置 <strong>studio.vmoptions</strong> 文件的位置。<br>文件包含影响 Java HotSpot 虚拟机性能特征的设置。<br><a href="https://developer.android.google.cn/studio/intro/studio-config#customize_vm">也可在 Studio 中设置</a>。</td></tr><tr><td><del><code>STUDIO_PROPERTIES</code></del></td><td>-</td><td>设置 <strong>idea.properties</strong> 文件的位置。可以使用此文件设置 Studio 的 IDE 属性(例如安装的插件),以及 IDE 支持的文件上限大小等。<br><a href="https://developer.android.google.cn/studio/intro/studio-config#customize_ide">也可在 Studio 中设置</a>。</td></tr><tr><td>!<code>STUDIO_JDK</code></td><td>-</td><td>Studio 所使用的 JDK 的位置。<br>IDE 启动时,会有这么个检查顺序:<code>STUDIO_JDK</code>、<code>JDK_HOME</code> 和 <code>JAVA_HOME</code>。</td></tr><tr><td><code>STUDIO_GRADLE_JDK</code></td><td>-</td><td>Studio 用于启动 Gradle 守护程序的 JDK 的位置。<br>若未定义,会使用在 <a href="https://developer.android.google.cn/studio/projects#ProjectStructure">Project Structure</a> 对话框中的设置值。</td></tr></tbody></table><h3 id="模拟器环境变量"><a href="#模拟器环境变量" class="headerlink" title="模拟器环境变量"></a>模拟器环境变量</h3><p>注:若变量设置无效,请尝试设置 <code>ANDROID_SDK_HOME</code> 变量,<a href="https://stackoverflow.com/questions/23042638/how-do-i-set-android-sdk-home-environment-variable#comment101433042_46976475">间接导向想要的位置</a>。</p><table><thead><tr><th>变量名</th><th>默认路径</th><th>作用</th></tr></thead><tbody><tr><td><code>ANDROID_EMULATOR_HOME</code></td><td><code>$ANDROID_SDK_HOME/.android/</code></td><td>设置特定于用户的模拟器配置目录的路径。</td></tr><tr><td><code>ANDROID_AVD_HOME</code></td><td><code>$ANDROID_EMULATOR_HOME/avd/</code></td><td>所有 AVD 特定文件的目录的路径,这些文件大多由非常大的磁盘映像组成。</td></tr></tbody></table><h3 id="Gradle"><a href="#Gradle" class="headerlink" title="Gradle"></a>Gradle</h3><p>各种依赖包也会保存在这<sup id="fnref:2" class="footnote-ref"><a href="#fn:2" rel="footnote"><span class="hint--top hint--rounded" aria-label="在 Windows 上优化 Android Studio 性能:Gradle 缓存">[2]</span></a></sup></p><table><thead><tr><th>变量名</th><th>默认路径</th><th>作用</th></tr></thead><tbody><tr><td>!<code>GRADLE_USER_HOME</code></td><td><code>%USERPROFILE%\.gradle</code></td><td>Gradle 缓存保存位置</td></tr></tbody></table><h3 id="效果图"><a href="#效果图" class="headerlink" title="效果图"></a>效果图</h3><p><img src="%E6%95%88%E6%9E%9C%E5%9B%BE.png" alt="效果图"></p><h2 id="配置文件修改"><a href="#配置文件修改" class="headerlink" title="配置文件修改"></a>配置文件修改</h2><h3 id="idea-properties"><a href="#idea-properties" class="headerlink" title="idea.properties"></a>idea.properties</h3><ul><li>路径:Android Studio安装目录\bin\idea.properties</li><li>作用:<br>修改用户配置文件,插件目录的存放位置。<br>原存放目录:<code>C:\Users\UserName\.AndroidStudio+版本号</code>,例 4.0 版本就是 <code>.AndroidStudio4.0</code>。</li><li>缺点:<ol><li>每次 Studio 更新,都会提醒要删除,不然无法安装。<br>解决的话可以通过<a href="https://baike.baidu.com/item/%E7%AC%A6%E5%8F%B7%E9%93%BE%E6%8E%A5/7177630?fr=aladdin">符号链接</a>直接把整个目录搬运,这样连文件都不需要修改了。<br>😘顺便配上懒人工具:<a href="https://github.com/imDema/FreeMove">FreeMove(可视化使用符号链接)</a><br><img src="idea.properties_%E4%BF%AE%E6%94%B9.png" alt="idea.properties 修改"> </li></ol></li></ul><h2 id="网络配置"><a href="#网络配置" class="headerlink" title="网络配置"></a>网络配置</h2><ol><li><a href="#">Post not found: 日志-利用_Docker_搭建_Nexus_仓库私服 搭建 Nexus 仓库给项目依赖加速</a>尝试 配置离线编译依赖项<br>请求依赖搭建成 查询本地离线 -》 Docker的Nexus仓库 -》 再去查找</li></ol><h2 id="插件篇"><a href="#插件篇" class="headerlink" title="插件篇"></a>插件篇</h2><ol><li><a href="https://github.com/JetBrains/idea-gitignore">.ignore</a><br>不是所有的文件都需要托管给 Git 这些版本管理文件,这个插件内置了一些规则,加快提交的速度等。</li><li><a href="https://github.com/shuzijun/leetcode-editor">LeetCode</a><br>无聊了可以刷刷题开放下思路,不用打开 <a href="https://leetcode-cn.com/">LeetCode</a> 看题目再在编译器编写,直接一步到位。</li><li><a href="https://github.com/wuseal/JsonToKotlinClass">JsonToKotlinClass</a><br>可以根据 Json 生成 Kotlin 的数据类。</li><li><a href="https://plugins.jetbrains.com/plugin/7983-android-wifi-adb">Android WiFi ADB</a><br>一键局域网连接调试手机。</li><li><a href="https://plugins.jetbrains.com/plugin/8575-nyan-progress-bar">Nyan Progress Bar</a><br>魔性的彩虹猫加载样式,来点样式舒服下。</li></ol><h2 id="参考资料"><a href="#参考资料" class="headerlink" title="参考资料"></a>参考资料</h2><p><strong>注:</strong> 文章可能存在过时因素,请参考官方文档为主 </p><section class="footnotes"><div class="footnote-list"><ol><li><span id="fn:1" class="footnote-text"><span><a href="https://developer.android.google.cn/studio/command-line/variables#envar">环境变量:变量参考</a><a href="#fnref:1" rev="footnote" class="footnote-backref"> ↩</a></span></span></li><li><span id="fn:2" class="footnote-text"><span><a href="https://developer.android.google.cn/studio/intro/studio-config.html#optimize-studio-windows">在 Windows 上优化 Android Studio 性能:Gradle 缓存</a><a href="#fnref:2" rev="footnote" class="footnote-backref"> ↩</a></span></span></li></ol></div></section>]]></content>
<categories>
<category>攻打 Android</category>
</categories>
<tags>
<tag>Android</tag>
<tag>配置</tag>
</tags>
</entry>
<entry>
<title>配置.Java(Win)</title>
<link href="/blog/2020/05/12/%E9%85%8D%E7%BD%AE-Java%EF%BC%88Win%EF%BC%89/"/>
<url>/blog/2020/05/12/%E9%85%8D%E7%BD%AE-Java%EF%BC%88Win%EF%BC%89/</url>
<content type="html"><![CDATA[<h3 id="JDK"><a href="#JDK" class="headerlink" title="JDK"></a>JDK</h3><p>环境变量添加相关的系统变量</p><ul><li>JAVA_HOME<ul><li>目录:jdk安装的绝对路径</li><li>作用:方便系统和各个软件引用 Java</li></ul></li><li>CLASSPATH<ul><li>目录:<code>.;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\lib\tools.jar;</code></li><li>作用:程序中所使用的类文件所在的位置,开头的 . 则表示搜索当前目录</li></ul></li></ul><h3 id="Path-配置"><a href="#Path-配置" class="headerlink" title="Path 配置"></a>Path 配置</h3><p>添加到环境变量的 Path 变量即可<br>作用:可执行文件的搜索路径</p><pre><code>%JAVA_HOME%\bin%JAVA_HOME%\jre\bin</code></pre><p><img src="Path_%E9%85%8D%E7%BD%AE.png" alt="Path 配置"></p>]]></content>
<categories>
<category>攻打 Java</category>
</categories>
<tags>
<tag>配置</tag>
<tag>Java</tag>
<tag>Windows</tag>
</tags>
</entry>
<entry>
<title>记录.异常见闻录(Android)</title>
<link href="/blog/2020/05/11/%E8%AE%B0%E5%BD%95-%E5%BC%82%E5%B8%B8%E8%A7%81%E9%97%BB%E5%BD%95%EF%BC%88Android%EF%BC%89/"/>
<url>/blog/2020/05/11/%E8%AE%B0%E5%BD%95-%E5%BC%82%E5%B8%B8%E8%A7%81%E9%97%BB%E5%BD%95%EF%BC%88Android%EF%BC%89/</url>
<content type="html"><![CDATA[<h2 id="警告:仓库地址不安全"><a href="#警告:仓库地址不安全" class="headerlink" title="警告:仓库地址不安全"></a>警告:仓库地址不安全</h2><figure class="highlight text"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">Using insecure protocols with repositories, without explicit opt-in, is unsupported. Switch Maven repository 'maven(http://...)' to redirect to a secure protocol (like HTTPS) or allow insecure protocols. See https://docs.gradle.org/7.0.2/dsl/org.gradle.api.artifacts.repositories.UrlArtifactRepository.html#org.gradle.api.artifacts.repositories.UrlArtifactRepository:allowInsecureProtocol for more details. </span><br></pre></td></tr></table></figure><p>提示:不支持没有明确选择的情况将不安全的协议与存储库一起使用。</p><ul><li>解决:<ol><li>使用安全的协议 <code>https://</code></li><li>添加 <code>allowInsecureProtocol</code> 属性允许</li></ol></li></ul><figure class="highlight xml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">maven {</span><br><span class="line"> url("http://localhost:8081/repository/aliyun-public/")</span><br><span class="line"> allowInsecureProtocol(true)</span><br><span class="line">}</span><br></pre></td></tr></table></figure><h2 id="Shape-资源的虚线变实线"><a href="#Shape-资源的虚线变实线" class="headerlink" title="Shape 资源的虚线变实线"></a>Shape 资源的虚线变实线</h2><p>调用的 <strong>View</strong> 关闭硬件加速<br><code>android:layerType="software"</code></p><hr><h2 id="规范创建-Drawable-文件夹"><a href="#规范创建-Drawable-文件夹" class="headerlink" title="规范创建 Drawable 文件夹"></a>规范创建 Drawable 文件夹</h2><p>右击res -> new -> Android Resource Directory -> Density (**>>** 选择)<br><img src="%E8%A7%84%E8%8C%83%E5%88%9B%E5%BB%BA_Drawable_%E6%96%87%E4%BB%B6%E5%A4%B9.png" alt="规范创建 Drawable 文件夹"></p><hr><h2 id="包名修改"><a href="#包名修改" class="headerlink" title="包名修改"></a>包名修改</h2><ol><li>右键重构重命名或者默认快捷键 <strong>Shift + F6</strong> 对应层级,<br>记得时重构包,而不是重命名目录。<br><img src="%E5%8C%85%E5%90%8D%E4%BF%AE%E6%94%B9_%E9%87%8D%E6%9E%84%E5%8C%85%E5%90%8D.png" alt="包名修改 重构包名"></li><li>然后在对应的 <strong>build.gradle</strong> 修改 <strong>applicationId</strong> 。</li><li>若要修改项目(根目录)名,<br>则在 <strong>Studio</strong> 关闭项目后,<br>重命名根目录文件夹,<br>并修改目录里面 <strong>settings.gradle</strong> 文件的 <strong>rootProject.name</strong> 。</li></ol>]]></content>
<categories>
<category>攻打 Android</category>
</categories>
<tags>
<tag>Android</tag>
<tag>持续更新</tag>
</tags>
</entry>
<entry>
<title>日志.博客无法被搜索?</title>
<link href="/blog/2020/05/06/%E6%97%A5%E5%BF%97-%E5%8D%9A%E5%AE%A2%E6%97%A0%E6%B3%95%E8%A2%AB%E6%90%9C%E7%B4%A2%EF%BC%9F/"/>
<url>/blog/2020/05/06/%E6%97%A5%E5%BF%97-%E5%8D%9A%E5%AE%A2%E6%97%A0%E6%B3%95%E8%A2%AB%E6%90%9C%E7%B4%A2%EF%BC%9F/</url>
<content type="html"><![CDATA[<p>原本是搭建在服务器的,可以被正常搜索的,无奈带宽太小,文章加载实在太慢….,<br>就放置到了 Github ,结果这年头想被白嫖都要花功夫了 ( ఠൠఠ )ノ</p><h2 id="博客环境"><a href="#博客环境" class="headerlink" title="博客环境"></a>博客环境</h2><ol><li><a href="https://hexo.io/zh-cn/">Hexo</a> 搭建</li><li><a href="https://pages.github.com/">Github Pages</a> 放置(平时通过 <strong>xxx.github.io</strong> 访问)</li></ol><h2 id="无法被爬(搜索)?"><a href="#无法被爬(搜索)?" class="headerlink" title="无法被爬(搜索)?"></a>无法被爬(搜索)?</h2><h3 id="测试是否被搜录"><a href="#测试是否被搜录" class="headerlink" title="测试是否被搜录"></a>测试是否被搜录</h3><p>在搜索引擎(百度,Google,必应等)直接输入,即可知道是否可被搜索引擎爬取到</p><figure class="highlight txt"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">site:用户名.github.io</span><br><span class="line"># site 将搜索范围限定在特定站点</span><br></pre></td></tr></table></figure><h3 id="原因"><a href="#原因" class="headerlink" title="原因"></a>原因</h3><p>Google 和 必应 不清楚为啥被反爬。<br>但特别的是百度 (lll¬ω¬) ,GitHub 给出的官方原因是百度爬虫爬得太狠,影响了 Github Page 服务的正常使用。</p><h2 id="站点地图(sitemap-xml)"><a href="#站点地图(sitemap-xml)" class="headerlink" title="站点地图(sitemap.xml)"></a>站点地图(sitemap.xml)</h2><p><a href="https://baike.baidu.com/item/%E7%AB%99%E7%82%B9%E5%9C%B0%E5%9B%BE/9991876?fr=aladdin">站点地图</a>是一个网站所有链接的容器。一般存放在根目录下并命名 <strong>sitemap</strong> ,为爬虫指路,增加网站重要内容页面的收录。<br>所以我们需要创建一个 <strong>地图</strong> 给搜索引擎 <strong>用于索引</strong></p><ol><li>在博客目录安装<a href="https://github.com/hexojs/hexo-generator-sitemap">扩展</a>,每次构建时都会自动生成。<br><code>npm install hexo-generator-sitemap --save</code></li><li>构建并上传到 Github<br><code>hexo d -g</code></li></ol><h2 id="开始动工"><a href="#开始动工" class="headerlink" title="开始动工"></a>开始动工</h2><h3 id="Google-收录"><a href="#Google-收录" class="headerlink" title="Google 收录"></a>Google 收录</h3><h4 id="1-绑定网址"><a href="#1-绑定网址" class="headerlink" title="1. 绑定网址"></a>1. 绑定网址</h4><p>在 <a href="https://search.google.com/search-console/">Google Search Console</a></p><ol><li>申请,并根据在 <strong>Github Page</strong> 的设置输入访问地址</li><li>然后会生成一个 html 文件,用于验证所有权,下载并放置于根目录(本地博客目录的 source 文件夹) <div class="group-image-container"><div class="group-image-row"><div class="group-image-wrap"><img src="Google_Search_Console_%E9%80%89%E6%8B%A9.png" alt="Google Search Console 选择"></div><div class="group-image-wrap"><img src="Google_Search_Console_%E9%AA%8C%E8%AF%81%E6%89%80%E6%9C%89%E6%9D%83.png" alt="Google Search Console 验证所有权"></div></div></div></li></ol><h4 id="2-添加站点地图被搜索"><a href="#2-添加站点地图被搜索" class="headerlink" title="2. 添加站点地图被搜索"></a>2. 添加站点地图被搜索</h4><p>插件安装完后,需要重新构建一下,生成 <strong>sitemap.xml</strong><br>别忘了也同步到 Github ,不然会无法被检测到<br>然后在 <a href="https://search.google.com/search-console/">Google Search Console</a> 添加站点地图<br><img src="Google_Search_Console_%E6%B7%BB%E5%8A%A0%E7%AB%99%E7%82%B9%E5%9C%B0%E5%9B%BE.png" alt="Google Search Console 添加站点地图"></p><h4 id="3-提高抓取队列的优先级并测试"><a href="#3-提高抓取队列的优先级并测试" class="headerlink" title="3. 提高抓取队列的优先级并测试"></a>3. 提高抓取队列的优先级并测试</h4><p>Google 更新索引需要一个较长的时间,可以自己手动添加索引测试,填写文章的<strong>完整地址</strong><br>注:不一定马上能被搜索到,只能一定程度上提高抓取队列的优先级<br><img src="Google_Search_Console_%E6%89%8B%E5%8A%A8%E6%B7%BB%E5%8A%A0%E7%B4%A2%E5%BC%95.png" alt="Google Search Console 手动添加索引"><br><img src="%E6%B5%8B%E8%AF%95_Google.png" alt="测试,Google"></p><h3 id="百度收录"><a href="#百度收录" class="headerlink" title="百度收录"></a>百度收录</h3><h3 id="必应收录"><a href="#必应收录" class="headerlink" title="必应收录"></a>必应收录</h3>]]></content>
<tags>
<tag>未完待续</tag>
<tag>日志</tag>
<tag>博客</tag>
<tag>搜索</tag>
</tags>
</entry>
<entry>
<title>日志.Docker 搭建 Nexus 仓库私服</title>
<link href="/blog/2020/04/26/%E6%97%A5%E5%BF%97-Docker_%E6%90%AD%E5%BB%BA_Nexus_%E4%BB%93%E5%BA%93%E7%A7%81%E6%9C%8D/"/>
<url>/blog/2020/04/26/%E6%97%A5%E5%BF%97-Docker_%E6%90%AD%E5%BB%BA_Nexus_%E4%BB%93%E5%BA%93%E7%A7%81%E6%9C%8D/</url>
<content type="html"><![CDATA[<h2 id="准备"><a href="#准备" class="headerlink" title="准备"></a>准备</h2><ol><li><a href="https://www.docker.com/">Docker</a></li><li><a href="https://hub.docker.com/r/sonatype/nexus3/">Nexus 镜像</a></li></ol><h2 id="拉取和启动-Nexus"><a href="#拉取和启动-Nexus" class="headerlink" title="拉取和启动 Nexus"></a>拉取和启动 Nexus</h2><h3 id="1-拉取镜像"><a href="#1-拉取镜像" class="headerlink" title="1. 拉取镜像"></a>1. 拉取镜像</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">docker pull sonatype/nexus3</span><br></pre></td></tr></table></figure><h3 id="2-启动"><a href="#2-启动" class="headerlink" title="2. 启动"></a>2. 启动</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">/*</span><br><span class="line"> * -d 后台运行</span><br><span class="line"> * -p 指定端口映射:主机(宿主)端口:容器端口</span><br><span class="line"> */</span><br><span class="line">docker run -d -p 8081:8081 sonatype/nexus3</span><br></pre></td></tr></table></figure><p>这里的启动是暂时的,无法保存设置等(设置的代理仓库,密码),<strong>stop</strong> 后再重新启动就会像第一次打开一样</p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line"># 数据持久化操作</span><br><span class="line"># 1. 创建数据卷</span><br><span class="line">docker volume create --name nexus-data</span><br><span class="line"></span><br><span class="line"># 2. 在启动容器的时候绑定数据卷</span><br><span class="line"># --name 命名容器,方便下次指定启动(直接:docker start nexus)</span><br><span class="line"># -v 绑定数据卷</span><br><span class="line">docker run -d -p 8081:8081 --name nexus -v nexus-data:/nexus-data sonatype/nexus3</span><br></pre></td></tr></table></figure><h3 id="3-获取登录密码"><a href="#3-获取登录密码" class="headerlink" title="3. 获取登录密码"></a>3. 获取登录密码</h3><p>Nexus 从 3.x 开始,密码不再固定,而是设备生成并保存在 <strong>admin.password</strong> 文件</p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line"># 执行命令进入一个交互的终端页面</span><br><span class="line">docker exec -it 容器id bash</span><br><span class="line"></span><br><span class="line"># 进入 Nexus 的数据目录</span><br><span class="line">cd /nexus-data/</span><br><span class="line"></span><br><span class="line"># 查看密码 </span><br><span class="line">vi admin.password</span><br></pre></td></tr></table></figure><p>不要通过 <strong>exit</strong> 或者 <strong>ctrl+d</strong> 退出交互,这样会连带着 <strong>容器</strong> 一并 <strong>stop</strong> </p><p>快捷键退出交互:<strong>ctrl + p + q</strong></p><p>然后稍等一会,直接访问:**<a href="http://localhost:8081/">http://localhost:8081/</a>**,就可以使用了</p><p>账号:<strong>admin</strong></p><p>密码:<strong>admin.password 的文本内容</strong></p><h3 id="4-后续使用"><a href="#4-后续使用" class="headerlink" title="4. 后续使用"></a>4. 后续使用</h3><p>如果是长久使用的,建议一开始就直接</p><ol><li>绑定数据卷启动,不然数据不会得到存储,每次启动都是个新的仓库(需要重新设置密码,代理仓库等)</li><li>容器启动时指定 <strong>name</strong> </li><li>轻轻松松执行<br><code>docker run name</code></li><li>如果是 <strong>Docker Hub</strong> 还可以界面操作启动<br><img src="Docker_Hub_%E5%AE%B9%E5%99%A8%E7%9B%AE%E5%BD%95.png" alt="Docker Hub 容器目录"></li></ol><h2 id="代理且使用仓库"><a href="#代理且使用仓库" class="headerlink" title="代理且使用仓库"></a>代理且使用仓库</h2><p>为了方便使用,建议打开 “匿名访问服务器” 选项<br>不然每次拉取仓库文件都需要配置个 “密码”<br><img src="Nexus_%E5%8C%BF%E5%90%8D%E8%AE%BF%E9%97%AE%E6%9C%8D%E5%8A%A1%E5%99%A8.png" alt="Nexus 匿名访问服务器"></p><h2 id="仓库分类"><a href="#仓库分类" class="headerlink" title="仓库分类"></a>仓库分类</h2><p><img src="Nexus_Repositories_Type.png" alt="Nexus 仓库类型"></p><table><thead><tr><th>分类</th><th>说明</th></tr></thead><tbody><tr><td>group</td><td>仓库组合,多个仓库组合为一个地址提供服务</td></tr><tr><td>hosted</td><td>本地仓库,像官方仓库一样提供本地私有仓库功能</td></tr><tr><td>proxy</td><td>代理其他仓库</td></tr></tbody></table><h2 id="创建仓库"><a href="#创建仓库" class="headerlink" title="创建仓库"></a>创建仓库</h2><p>注:以下教程是按照本人开发环境设置写录,请根据需要参考修改</p><h3 id="需要代理的仓库"><a href="#需要代理的仓库" class="headerlink" title="需要代理的仓库"></a>需要代理的仓库</h3><table><thead><tr><th>仓库名</th><th>类型</th><th><a href="(https://maven.aliyun.com/)">阿里源</a></th><th>源地址</th><th>说明</th></tr></thead><tbody><tr><td>android</td><td>group</td><td></td><td></td><td>聚合仓</td></tr><tr><td>google</td><td>proxy</td><td><a href="https://maven.aliyun.com/repository/google">https://maven.aliyun.com/repository/google</a></td><td><a href="https://maven.google.com/">https://maven.google.com/</a></td><td></td></tr><tr><td>central</td><td>proxy</td><td><a href="https://maven.aliyun.com/repository/central">https://maven.aliyun.com/repository/central</a></td><td><a href="https://repo1.maven.org/maven2/">https://repo1.maven.org/maven2/</a></td><td></td></tr><tr><td>jcenter</td><td>proxy</td><td><a href="https://maven.aliyun.com/repository/public">https://maven.aliyun.com/repository/public</a></td><td><a href="http://jcenter.bintray.com/">http://jcenter.bintray.com/</a></td><td></td></tr><tr><td>public</td><td>proxy</td><td><a href="https://maven.aliyun.com/repository/public">https://maven.aliyun.com/repository/public</a></td><td></td><td>central仓和 jcenter 仓的聚合仓</td></tr></tbody></table><h3 id="配置"><a href="#配置" class="headerlink" title="配置"></a>配置</h3><p><img src="Nexus_My_Repository.png" alt="我的仓库配置"></p><h2 id="备份数据"><a href="#备份数据" class="headerlink" title="备份数据"></a>备份数据</h2><p>直接备份数据卷即可。<br>可以参考:<a href="/blog/2020/06/06/%E6%97%A5%E5%BF%97-Docker_%E5%85%B3%E4%BA%8E%E5%A4%87%E4%BB%BD%E7%9A%84%E4%B8%80%E4%BA%9B%E5%B0%8F%E4%BA%8B/" title="日志.Docker 关于备份的一些小事">日志.Docker 关于备份的一些小事</a></p>]]></content>
<categories>
<category>攻打 Docker</category>
</categories>
<tags>
<tag>日志</tag>
<tag>Docker</tag>
<tag>Nexus</tag>
<tag>仓库</tag>
</tags>
</entry>
<entry>
<title>文章.Kotlin 函数式编程</title>
<link href="/blog/2020/04/06/%E6%96%87%E7%AB%A0-Kotlin_%E5%87%BD%E6%95%B0%E5%BC%8F%E7%BC%96%E7%A8%8B/"/>
<url>/blog/2020/04/06/%E6%96%87%E7%AB%A0-Kotlin_%E5%87%BD%E6%95%B0%E5%BC%8F%E7%BC%96%E7%A8%8B/</url>
<content type="html"><![CDATA[<h2 id="参看记录,等待记录内容"><a href="#参看记录,等待记录内容" class="headerlink" title="参看记录,等待记录内容"></a>参看记录,等待记录内容</h2><ol><li>P65 Lambda</li><li>P261 高阶函数</li><li>P312 应用</li><li>P381 infix</li></ol><h2 id="Lambda"><a href="#Lambda" class="headerlink" title="Lambda"></a>Lambda</h2><h3 id="是啥?"><a href="#是啥?" class="headerlink" title="是啥?"></a>是啥?</h3><p>一小段可以作为参数传递的代码。</p><h3 id="语法结构"><a href="#语法结构" class="headerlink" title="语法结构"></a>语法结构</h3><p><code>{参数名1: 参数类型, 参数名2: 参数类型 -> 函数体}</code></p><ol><li>最外层是一对大括号 <strong>{}</strong></li><li>有参数传入到 Lambda 表达式的话</li></ol>]]></content>
<categories>
<category>攻打 Kotlin</category>
</categories>
<tags>
<tag>未完待续</tag>
<tag>Kotlin</tag>
</tags>
</entry>
<entry>
<title>日志.第一次抓包被毒打</title>
<link href="/blog/2020/03/31/%E6%97%A5%E5%BF%97-%E7%AC%AC%E4%B8%80%E6%AC%A1%E6%8A%93%E5%8C%85%E8%A2%AB%E6%AF%92%E6%89%93/"/>
<url>/blog/2020/03/31/%E6%97%A5%E5%BF%97-%E7%AC%AC%E4%B8%80%E6%AC%A1%E6%8A%93%E5%8C%85%E8%A2%AB%E6%AF%92%E6%89%93/</url>
<content type="html"><![CDATA[<h2 id="起因"><a href="#起因" class="headerlink" title="起因"></a>起因</h2><p>设置的云同步是非常的爽,但作为一个处女座的懒人,我被彻底地制裁了…<br>平时都喜欢在x站上看视频,作为常年弹幕开启者,会经常为了观感而进行设置,最常设置的为字体大小<br>可最惨的是,我是多设备啊 >﹏< ,手机弹幕大小默认,但到了平板后,屏幕的大小发生了变化,可弹幕字体大小还是默认100啊,超大有木有<br>一旦调到了喜欢的 70,开开心心追完番,结果一到手机…<br>瞎眼程度的小啊!!!!</p><h2 id="分析"><a href="#分析" class="headerlink" title="分析"></a>分析</h2><p>根据平常使用,发现弹幕的设置变化后,其他端没有实时变化,进入到下一视频才会发生变化,设备离线情况下除外</p><ol><li>设置变动的时候会发出请求</li><li>进入播放页面时会获取用户的设置请求</li></ol><p>想要解决我们的问题:</p><ol><li>要么在进入每次视频详情页面以前重发一份我们的设置</li><li>要么直接拦截获取播放设置的请求 </li></ol><p>主要还是想实行第一种的,毕竟还是希望拦截等级,拦截词等等也有实时同步的<br>q(≧▽≦q)</p><h2 id="开始抓包"><a href="#开始抓包" class="headerlink" title="开始抓包"></a>开始抓包</h2><p>偷懒中….╰( ̄ω ̄o)</p>]]></content>
<tags>
<tag>未完待续</tag>
<tag>日志</tag>
<tag>抓包</tag>
</tags>
</entry>
<entry>
<title>Hello World</title>
<link href="/blog/2020/03/01/hello-world/"/>
<url>/blog/2020/03/01/hello-world/</url>
<content type="html"><![CDATA[<p>Welcome to <a href="https://hexo.io/">Hexo</a>! This is your very first post. Check <a href="https://hexo.io/docs/">documentation</a> for more info. If you get any problems when using Hexo, you can find the answer in <a href="https://hexo.io/docs/troubleshooting.html">troubleshooting</a> or you can ask me on <a href="https://github.com/hexojs/hexo/issues">GitHub</a>.</p><h2 id="Quick-Start"><a href="#Quick-Start" class="headerlink" title="Quick Start"></a>Quick Start</h2><h3 id="Create-a-new-post"><a href="#Create-a-new-post" class="headerlink" title="Create a new post"></a>Create a new post</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">hexo new <span class="string">"My New Post"</span></span><br></pre></td></tr></table></figure><p>More info: <a href="https://hexo.io/docs/writing.html">Writing</a></p><h3 id="Run-server"><a href="#Run-server" class="headerlink" title="Run server"></a>Run server</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">hexo server</span><br></pre></td></tr></table></figure><p>More info: <a href="https://hexo.io/docs/server.html">Server</a></p><h3 id="Generate-static-files"><a href="#Generate-static-files" class="headerlink" title="Generate static files"></a>Generate static files</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">hexo generate</span><br></pre></td></tr></table></figure><p>More info: <a href="https://hexo.io/docs/generating.html">Generating</a></p><h3 id="Deploy-to-remote-sites"><a href="#Deploy-to-remote-sites" class="headerlink" title="Deploy to remote sites"></a>Deploy to remote sites</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">hexo deploy</span><br></pre></td></tr></table></figure><p>More info: <a href="https://hexo.io/docs/one-command-deployment.html">Deployment</a></p>]]></content>
</entry>
</search>