-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathatom.xml
477 lines (260 loc) · 48.9 KB
/
atom.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
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>Cucy的博客</title>
<link href="/atom.xml" rel="self"/>
<link href="http://zhourudong.cn/"/>
<updated>2023-12-11T07:18:57.702Z</updated>
<id>http://zhourudong.cn/</id>
<author>
<name>cucy</name>
</author>
<generator uri="http://hexo.io/">Hexo</generator>
<entry>
<title>Mr_Crowley_歌词</title>
<link href="http://zhourudong.cn/2021/06/25/80-Mr-Crowley-%E6%AD%8C%E8%AF%8D/"/>
<id>http://zhourudong.cn/2021/06/25/80-Mr-Crowley-歌词/</id>
<published>2021-06-25T03:41:47.000Z</published>
<updated>2023-12-11T07:18:57.702Z</updated>
<content type="html"><![CDATA[<figure class="highlight plain"><table><tr><td class="code"><pre><span class="line">Mr. Crowley, what went on in your head</span><br><span class="line">老克劳利,你在苦心经营着什么</span><br><span class="line">Mr. Crowley, did you talk to the dead</span><br><span class="line">老克劳利,你曾与死尸窃窃私语吗</span><br><span class="line">Your lifestyle to me seemed so tragic</span><br><span class="line">我看你活得真衰</span><br><span class="line">With the thrill of it all</span><br><span class="line">又他妈的火力全开</span><br><span class="line">You fooled all the people with magic</span><br><span class="line">你用小把戏欺世盗名</span><br><span class="line">You waited on Satan's door</span><br><span class="line">却在撒旦那儿程门立雪</span><br><span class="line">Mr. Charming, did you think you were pure</span><br><span class="line">笑面虎,你自以为一片冰心在玉壶吗</span><br><span class="line">Mr. Alarming, in nocturnal rapport</span><br><span class="line">吸血鬼,夜色就是你的披肩</span><br><span class="line">Uncovering things that were sacred manifest on this earth</span><br><span class="line">想掘地三尺集齐龙珠</span><br><span class="line">Conceived in the eye of a secret</span><br><span class="line">用以揣度圣意</span><br><span class="line">Yeah, they scattered the afterbirth</span><br><span class="line">却是见光死</span><br><span class="line"></span><br><span class="line">Solo</span><br><span class="line">单挑</span><br><span class="line"></span><br><span class="line">Mr. Crowley, won't you ride my white horse</span><br><span class="line">老克劳利,你骑朕的白龙马吗</span><br><span class="line">Mr. Crowley, it's symbolic of course</span><br><span class="line">老克劳利,你又要蠢蠢欲动了</span><br><span class="line">Approaching a time that is classic</span><br><span class="line">也无风雨也无晴</span><br><span class="line">I hear maidens call</span><br><span class="line">小女孩这么幻想着</span><br><span class="line">Approaching a time that is drastic</span><br><span class="line">山雨欲来风满楼</span><br><span class="line">Standing with their backs to the wall</span><br><span class="line">可屌丝们却这么想</span><br><span class="line"></span><br><span class="line">Was it polemically sent</span><br><span class="line">他们争论不休</span><br><span class="line">I wanna know what you meant</span><br><span class="line">我想知道你算哪根葱</span><br><span class="line">I wanna know</span><br><span class="line">我只想知道</span><br><span class="line">I wanna know what you meant, yeah!</span><br><span class="line">我想知道你到底算哪根葱</span><br><span class="line">solo</span><br><span class="line">单挑</span><br></pre></td></tr></table></figure>]]></content>
<summary type="html">
<figure class="highlight plain"><table><tr><td class="code"><pre><span class="line">Mr. Crowley, what went on in your head</span><br><span c
</summary>
<category term="歌词" scheme="http://zhourudong.cn/tags/%E6%AD%8C%E8%AF%8D/"/>
</entry>
<entry>
<title>MySQLTips</title>
<link href="http://zhourudong.cn/2021/02/26/79-MySQLTips/"/>
<id>http://zhourudong.cn/2021/02/26/79-MySQLTips/</id>
<published>2021-02-26T05:41:09.000Z</published>
<updated>2023-12-11T07:18:57.701Z</updated>
<content type="html"><![CDATA[<h1 id="INNODB-相关"><a href="#INNODB-相关" class="headerlink" title="INNODB 相关"></a>INNODB 相关</h1><p><a href="https://github.com/jeremycole/innodb_ruby" target="_blank" rel="external">https://github.com/jeremycole/innodb_ruby</a></p><h1 id="拷机"><a href="#拷机" class="headerlink" title="拷机"></a>拷机</h1><p><a href="https://github.com/030io/stress" target="_blank" rel="external">https://github.com/030io/stress</a></p><p>fio</p>]]></content>
<summary type="html">
<h1 id="INNODB-相关"><a href="#INNODB-相关" class="headerlink" title="INNODB 相关"></a>INNODB 相关</h1><p><a href="https://github.com/jeremycole/inn
</summary>
<category term="MySQL" scheme="http://zhourudong.cn/tags/MySQL/"/>
</entry>
<entry>
<title>java一些网站地址收藏</title>
<link href="http://zhourudong.cn/2020/08/04/78-java/"/>
<id>http://zhourudong.cn/2020/08/04/78-java/</id>
<published>2020-08-04T02:28:10.000Z</published>
<updated>2023-12-11T07:18:57.701Z</updated>
<content type="html"><![CDATA[<h1 id="API文档"><a href="#API文档" class="headerlink" title="API文档"></a>API文档</h1><figure class="highlight plain"><table><tr><td class="code"><pre><span class="line">https://github.com/APIJSON/APIJSON</span><br><span class="line"></span><br><span class="line">https://cizixs.com/2016/12/12/restful-api-design-guide/</span><br><span class="line"></span><br><span class="line">https://github.com/dakuohao/java-api-doc</span><br><span class="line">https://github.com/dakuohao/api-doc</span><br><span class="line">https://github.com/dakuohao/api-doc-angular</span><br><span class="line"></span><br><span class="line">https://gitee.com/loolly/hutool</span><br></pre></td></tr></table></figure>]]></content>
<summary type="html">
<h1 id="API文档"><a href="#API文档" class="headerlink" title="API文档"></a>API文档</h1><figure class="highlight plain"><table><tr><td class="code"><
</summary>
<category term="java网站收藏" scheme="http://zhourudong.cn/tags/java%E7%BD%91%E7%AB%99%E6%94%B6%E8%97%8F/"/>
</entry>
<entry>
<title>centos8通用配置</title>
<link href="http://zhourudong.cn/2019/11/02/77-centos8%E9%80%9A%E7%94%A8%E9%85%8D%E7%BD%AE/"/>
<id>http://zhourudong.cn/2019/11/02/77-centos8通用配置/</id>
<published>2019-11-02T07:16:14.000Z</published>
<updated>2023-12-11T07:18:57.701Z</updated>
<content type="html"><![CDATA[<p>yum源配置</p><figure class="highlight plain"><table><tr><td class="code"><pre><span class="line">[AppStream]</span><br><span class="line">name=CentOS-$releasever - AppStream</span><br><span class="line">baseurl=https://mirrors.aliyun.com/centos/8/AppStream/x86_64/os/</span><br><span class="line">gpgcheck=0</span><br><span class="line">enabled=1</span><br><span class="line">gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial</span><br><span class="line">[BaseOS]</span><br><span class="line">name=CentOS-$releasever - Base</span><br><span class="line">baseurl=https://mirrors.aliyun.com/centos/8/BaseOS/x86_64/os/</span><br><span class="line">gpgcheck=0</span><br><span class="line">enabled=1</span><br><span class="line">[extras]</span><br><span class="line">name=CentOS-$releasever - Extras</span><br><span class="line">baseurl=https://mirrors.aliyun.com/centos/8/extras/x86_64/os/</span><br><span class="line">gpgcheck=0</span><br><span class="line">enabled=1</span><br><span class="line">[epel]</span><br><span class="line">name=Extra Packages for Enterprise Linux $releasever - $basearch</span><br><span class="line">baseurl=https://mirrors.aliyun.com/epel/8/Everything/x86_64/</span><br><span class="line">enabled=1</span><br><span class="line">gpgcheck=0</span><br></pre></td></tr></table></figure>]]></content>
<summary type="html">
<p>yum源配置</p>
<figure class="highlight plain"><table><tr><td class="code"><pre><span class="line">[AppStream]</span><br><span class="line">n
</summary>
<category term="centos8" scheme="http://zhourudong.cn/tags/centos8/"/>
</entry>
<entry>
<title>Jenkins资源</title>
<link href="http://zhourudong.cn/2019/06/12/76-Jenkins%E8%B5%84%E6%BA%90/"/>
<id>http://zhourudong.cn/2019/06/12/76-Jenkins资源/</id>
<published>2019-06-12T01:20:55.000Z</published>
<updated>2023-12-11T07:18:57.701Z</updated>
<content type="html"><![CDATA[<p># </p><p><a href="https://www.cloudbees.com/blog?_escaped_fragment_=&view=550&page=2" target="_blank" rel="external">https://www.cloudbees.com/blog?_escaped_fragment_=&view=550&page=2</a></p><h1 id="jenkins"><a href="#jenkins" class="headerlink" title="jenkins"></a>jenkins</h1><p><a href="http://www.tsbakker.nl/jenkins.html" target="_blank" rel="external">http://www.tsbakker.nl/jenkins.html</a></p>]]></content>
<summary type="html">
<p># </p>
<p><a href="https://www.cloudbees.com/blog?_escaped_fragment_=&amp;view=550&amp;page=2" target="_blank" rel="external">https://www
</summary>
<category term="jenkins" scheme="http://zhourudong.cn/tags/jenkins/"/>
</entry>
<entry>
<title>k8s-resource</title>
<link href="http://zhourudong.cn/2019/06/10/75-k8s-resource/"/>
<id>http://zhourudong.cn/2019/06/10/75-k8s-resource/</id>
<published>2019-06-10T01:40:21.000Z</published>
<updated>2023-12-11T11:23:59.408Z</updated>
<content type="html"><![CDATA[<h1 id="部署工具"><a href="#部署工具" class="headerlink" title="部署工具"></a>部署工具</h1><p><a href="https://zhaohuabing.com/2018/04/16/using-helm-to-deploy-to-kubernetes/" target="_blank" rel="external">https://zhaohuabing.com/2018/04/16/using-helm-to-deploy-to-kubernetes/</a></p><h1 id="学习网站"><a href="#学习网站" class="headerlink" title="学习网站"></a>学习网站</h1><p><a href="https://www.katacoda.com/courses/kubernetes/launch-single-node-cluster" target="_blank" rel="external">https://www.katacoda.com/courses/kubernetes/launch-single-node-cluster</a></p><p><a href="https://labs.play-with-k8s.com" target="_blank" rel="external">https://labs.play-with-k8s.com</a></p><p># </p><p><a href="https://developer.ibm.com/opentech/2017/06/21/tour-kubernetes-source-code-part-one-kubectl-api-server/" target="_blank" rel="external">https://developer.ibm.com/opentech/2017/06/21/tour-kubernetes-source-code-part-one-kubectl-api-server/</a></p><h1 id="培训"><a href="#培训" class="headerlink" title="培训"></a>培训</h1><p>kadm-2019-06.container.training<br>qconuk2019.container.training<br>container.training<br>intro-2019-01.container.training/#1<br>kadm-2019-04.container.training<br>pycon2019.container.training<br>k8s2d.container.training<br>oscon2019.container.training<br>gotochgo2019.container.training<br>intro-2019-01.container.training</p><p>tinyshellscript.com/kubernetes-bootstrap.html<br>tinyshellscript.com/kubernetes-ops-week.html<br>tinyshellscript.com/training.html<br>training.play-with-kubernetes.com</p>]]></content>
<summary type="html">
<h1 id="部署工具"><a href="#部署工具" class="headerlink" title="部署工具"></a>部署工具</h1><p><a href="https://zhaohuabing.com/2018/04/16/using-helm-to-depl
</summary>
<category term="k8s" scheme="http://zhourudong.cn/tags/k8s/"/>
</entry>
<entry>
<title>php配置</title>
<link href="http://zhourudong.cn/2019/05/22/74-php%E9%85%8D%E7%BD%AE/"/>
<id>http://zhourudong.cn/2019/05/22/74-php配置/</id>
<published>2019-05-22T01:48:57.000Z</published>
<updated>2023-12-11T07:18:57.700Z</updated>
<content type="html"><![CDATA[<h1 id="docker-php版本"><a href="#docker-php版本" class="headerlink" title="docker-php版本"></a>docker-php版本</h1><figure class="highlight plain"><table><tr><td class="code"><pre><span class="line">docker pull php:5.5-fpm-alpine</span><br></pre></td></tr></table></figure><p><a href="https://github.com/docker-library/php/tree/882b9c25f14e782e45a978a68d48843b7ac54042/5.5/fpm/alpine" target="_blank" rel="external">https://github.com/docker-library/php/tree/882b9c25f14e782e45a978a68d48843b7ac54042/5.5/fpm/alpine</a></p>]]></content>
<summary type="html">
<h1 id="docker-php版本"><a href="#docker-php版本" class="headerlink" title="docker-php版本"></a>docker-php版本</h1><figure class="highlight plain"><
</summary>
<category term="php" scheme="http://zhourudong.cn/tags/php/"/>
</entry>
<entry>
<title>maven常用命令</title>
<link href="http://zhourudong.cn/2019/04/18/73-maven%E5%B8%B8%E7%94%A8%E5%91%BD%E4%BB%A4/"/>
<id>http://zhourudong.cn/2019/04/18/73-maven常用命令/</id>
<published>2019-04-18T02:38:57.000Z</published>
<updated>2023-12-11T07:18:57.700Z</updated>
<content type="html"><![CDATA[<figure class="highlight plain"><table><tr><td class="code"><pre><span class="line">mvn help:effective-settings // 检查当前Maven环境启用的文件 </span><br><span class="line">mvn help:effective-pom // 查看当前项目的pom配置,包括所有依赖</span><br><span class="line">mvn help:active-profiles // 查看当前处于激活状态的profile</span><br><span class="line"></span><br><span class="line">mvn -s <filepath> <goal> // 指定使用某个配置文件执行Maven命令</span><br><span class="line">mvn -s ~/.m2/settings_local.xml clean deploy // 指定使用某个配置文件执行Maven命令</span><br><span class="line"></span><br><span class="line">mvn -X // 查看当前项目的所有mvn配置</span><br><span class="line">mvn help:system // 打印所有可用的环境变量和Java系统属性</span><br></pre></td></tr></table></figure><figure class="highlight plain"><table><tr><td class="code"><pre><span class="line">mvn -v //查看版本</span><br><span class="line">mvn archetype:create //创建 Maven 项目</span><br><span class="line">mvn compile //编译源代码</span><br><span class="line">mvn test-compile //编译测试代码</span><br><span class="line">mvn test //运行应用程序中的单元测试</span><br><span class="line">mvn site //生成项目相关信息的网站</span><br><span class="line">mvn package //依据项目生成 jar 文件</span><br><span class="line">mvn install //在本地 Repository 中安装 jar</span><br><span class="line">mvn -Dmaven.test.skip=true //忽略测试文档编译</span><br><span class="line">mvn clean //清除目标目录中的生成结果</span><br><span class="line">mvn clean compile //将.java类编译为.class文件</span><br><span class="line">mvn clean package //进行打包</span><br><span class="line">mvn clean test //执行单元测试</span><br><span class="line">mvn clean deploy //部署到版本仓库</span><br><span class="line">mvn clean install //使其他项目使用这个jar,会安装到maven本地仓库中</span><br><span class="line">mvn archetype:generate //创建项目架构</span><br><span class="line">mvn dependency:list //查看已解析依赖</span><br><span class="line">mvn dependency:tree //看到依赖树</span><br><span class="line">mvn dependency:analyze //查看依赖的工具</span><br><span class="line">mvn help:system //从中央仓库下载文件至本地仓库</span><br><span class="line">mvn help:active-profiles //查看当前激活的profiles</span><br><span class="line">mvn help:all-profiles //查看所有profiles</span><br><span class="line">mvn help:effective -pom //查看完整的pom信息</span><br></pre></td></tr></table></figure>]]></content>
<summary type="html">
<figure class="highlight plain"><table><tr><td class="code"><pre><span class="line">mvn help:effective-settings // 检查当前Maven环境启用的文件 </spa
</summary>
<category term="mvn" scheme="http://zhourudong.cn/tags/mvn/"/>
</entry>
<entry>
<title>网络常用技巧</title>
<link href="http://zhourudong.cn/2019/03/05/72-%E7%BD%91%E7%BB%9C%E5%B8%B8%E7%94%A8%E6%8A%80%E5%B7%A7/"/>
<id>http://zhourudong.cn/2019/03/05/72-网络常用技巧/</id>
<published>2019-03-05T01:56:23.000Z</published>
<updated>2023-12-11T07:18:57.700Z</updated>
<summary type="html">
</summary>
<category term="网络" scheme="http://zhourudong.cn/tags/%E7%BD%91%E7%BB%9C/"/>
</entry>
<entry>
<title>cow配置</title>
<link href="http://zhourudong.cn/2019/02/23/71-cow%E9%85%8D%E7%BD%AE/"/>
<id>http://zhourudong.cn/2019/02/23/71-cow配置/</id>
<published>2019-02-23T02:28:52.000Z</published>
<updated>2023-12-11T07:18:57.700Z</updated>
<content type="html"><![CDATA[<h1 id="下载"><a href="#下载" class="headerlink" title="下载"></a>下载</h1><p><a href="https://github.com/cyfdecyf/cow/releases" target="_blank" rel="external">https://github.com/cyfdecyf/cow/releases</a></p><h2 id="windows"><a href="#windows" class="headerlink" title="windows"></a>windows</h2><p>打开 rc.txt</p><p><code>在项目的配置文件中配置监听和代理</code></p><figure class="highlight plain"><table><tr><td class="code"><pre><span class="line">listen = http://127.0.0.1:7777</span><br><span class="line">proxy = socks5://127.0.0.1:1080</span><br></pre></td></tr></table></figure><p><code>设置环境变量</code></p><p>// 之后设置环境变量</p><figure class="highlight plain"><table><tr><td class="code"><pre><span class="line">set http_proxy=http://127.0.0.1:7777</span><br><span class="line">set https_proxy=http://127.0.0.1:7777</span><br></pre></td></tr></table></figure><figure class="highlight plain"><table><tr><td class="code"><pre><span class="line">export http_proxy=http://127.0.0.1:7777</span><br><span class="line">export https_proxy=http://127.0.0.1:7777</span><br></pre></td></tr></table></figure><figure class="highlight plain"><table><tr><td class="code"><pre><span class="line">Windows系统(git + ss):</span><br><span class="line"></span><br><span class="line">复制代码</span><br><span class="line">设置代理 http/https协议(clone https://前缀的repo会走ss)</span><br><span class="line">git config --global http.proxy 'socks5://127.0.0.1:1080'</span><br><span class="line">git config --global https.proxy 'socks5://127.0.0.1:1080'</span><br><span class="line"></span><br><span class="line">删除</span><br><span class="line">git config --global --unset http.proxy</span><br><span class="line">git config --global --unset https.proxy</span><br><span class="line">复制代码</span><br><span class="line"> 或者直接在 .gitconfig 文件中加上:</span><br><span class="line"></span><br><span class="line">[http]</span><br><span class="line"> proxy = http://127.0.0.1:1080</span><br><span class="line"> sslVerify = false</span><br><span class="line">[https]</span><br><span class="line"> proxy = https://127.0.0.1:1080</span><br><span class="line"> Update(Win10):</span><br><span class="line"></span><br><span class="line">ssr配合cow可以解决go get的问题。(ssr全局模式,vscode里不用设置代理,.gitignore里也不用设置代理。)</span><br><span class="line"></span><br><span class="line">cow目录中有个rc.txt文件,打开后删除全部内容,然后添加两行:</span><br><span class="line"></span><br><span class="line">listen = http://127.0.0.1:7777</span><br><span class="line">proxy = socks5://127.0.0.1:1080</span><br><span class="line">最后在环境变量里加上2个变量:</span><br><span class="line"></span><br><span class="line">export http_proxy='http://127.0.0.1:7777'</span><br><span class="line">export https_proxy='http://127.0.0.1:7777'</span><br><span class="line">启动ssr,运行cow-taskbar.exe,然后go get吧!</span><br></pre></td></tr></table></figure>]]></content>
<summary type="html">
<h1 id="下载"><a href="#下载" class="headerlink" title="下载"></a>下载</h1><p><a href="https://github.com/cyfdecyf/cow/releases" target="_blank" rel
</summary>
<category term="cow" scheme="http://zhourudong.cn/tags/cow/"/>
</entry>
<entry>
<title>go优秀博文</title>
<link href="http://zhourudong.cn/2018/12/06/70-go%E4%BC%98%E7%A7%80%E5%8D%9A%E6%96%87/"/>
<id>http://zhourudong.cn/2018/12/06/70-go优秀博文/</id>
<published>2018-12-06T00:49:50.000Z</published>
<updated>2023-12-11T07:18:57.700Z</updated>
<content type="html"><![CDATA[<ul><li>延迟调式</li></ul><p><a href="https://medium.com/observability/debugging-latency-in-go-1-11-9f97a7910d68" target="_blank" rel="external">https://medium.com/observability/debugging-latency-in-go-1-11-9f97a7910d68</a></p>]]></content>
<summary type="html">
<ul>
<li>延迟调式</li>
</ul>
<p><a href="https://medium.com/observability/debugging-latency-in-go-1-11-9f97a7910d68" target="_blank" rel="extern
</summary>
<category term="golang" scheme="http://zhourudong.cn/tags/golang/"/>
</entry>
<entry>
<title>微服务</title>
<link href="http://zhourudong.cn/2018/11/03/69-%E5%BE%AE%E6%9C%8D%E5%8A%A1/"/>
<id>http://zhourudong.cn/2018/11/03/69-微服务/</id>
<published>2018-11-03T01:49:06.000Z</published>
<updated>2023-12-11T07:18:57.699Z</updated>
<summary type="html">
</summary>
<category term="微服务" scheme="http://zhourudong.cn/tags/%E5%BE%AE%E6%9C%8D%E5%8A%A1/"/>
</entry>
<entry>
<title>酷站收藏</title>
<link href="http://zhourudong.cn/2018/09/28/68-%E9%85%B7%E7%AB%99%E6%94%B6%E8%97%8F/"/>
<id>http://zhourudong.cn/2018/09/28/68-酷站收藏/</id>
<published>2018-09-28T02:41:35.000Z</published>
<updated>2023-12-11T07:18:57.699Z</updated>
<content type="html"><![CDATA[<h1 id="前端"><a href="#前端" class="headerlink" title="前端"></a>前端</h1><p>表严肃 </p><p><a href="http://biaoyansu.com/e10" target="_blank" rel="external">http://biaoyansu.com/e10</a></p><p>php 源</p><p><a href="https://mirrors.tuna.tsinghua.edu.cn/remi/" target="_blank" rel="external">https://mirrors.tuna.tsinghua.edu.cn/remi/</a></p><p>mac ntfs 挂载</p><p><a href="https://www.cnblogs.com/MDK-L/p/4531778.html" target="_blank" rel="external">https://www.cnblogs.com/MDK-L/p/4531778.html</a></p><p>http 流量拷贝</p><p><a href="https://github.com/buger/goreplay" target="_blank" rel="external">https://github.com/buger/goreplay</a></p><p>golang </p><p>三种设计模式<br><a href="https://blog.appdynamics.com/engineering/three-productive-go-patterns-put-radar/" target="_blank" rel="external">https://blog.appdynamics.com/engineering/three-productive-go-patterns-put-radar/</a></p><p>jwt flask</p><p><a href="https://www.thatyou.cn/flask-pyjwt-%E5%AE%9E%E7%8E%B0%E5%9F%BA%E4%BA%8Ejson-web-token%E7%9A%84%E7%94%A8%E6%88%B7%E8%AE%A4%E8%AF%81%E6%8E%88%E6%9D%83/" target="_blank" rel="external">https://www.thatyou.cn/flask-pyjwt-%E5%AE%9E%E7%8E%B0%E5%9F%BA%E4%BA%8Ejson-web-token%E7%9A%84%E7%94%A8%E6%88%B7%E8%AE%A4%E8%AF%81%E6%8E%88%E6%9D%83/</a></p><h1 id="devops-资源参考"><a href="#devops-资源参考" class="headerlink" title="devops 资源参考"></a>devops 资源参考</h1><blockquote><p>好的示例代码</p></blockquote><p><a href="https://github.com/ixrjog/caesar" target="_blank" rel="external">https://github.com/ixrjog/caesar</a></p><blockquote><p>看板</p></blockquote><p><a href="https://github.com/phodal/ledge" target="_blank" rel="external">https://github.com/phodal/ledge</a></p><h1 id="跳板机"><a href="#跳板机" class="headerlink" title="跳板机"></a>跳板机</h1><p><a href="https://github.com/tp4a/teleport" target="_blank" rel="external">https://github.com/tp4a/teleport</a></p>]]></content>
<summary type="html">
<h1 id="前端"><a href="#前端" class="headerlink" title="前端"></a>前端</h1><p>表严肃 </p>
<p><a href="http://biaoyansu.com/e10" target="_blank" rel="
</summary>
<category term="网站" scheme="http://zhourudong.cn/tags/%E7%BD%91%E7%AB%99/"/>
</entry>
<entry>
<title>微服务</title>
<link href="http://zhourudong.cn/2018/09/06/66-%E5%BE%AE%E6%9C%8D%E5%8A%A1/"/>
<id>http://zhourudong.cn/2018/09/06/66-微服务/</id>
<published>2018-09-06T10:52:21.000Z</published>
<updated>2023-12-11T07:18:57.699Z</updated>
<content type="html"><![CDATA[<h1 id="网站"><a href="#网站" class="headerlink" title="网站"></a>网站</h1><p><a href="https://micro.mu/blog/" target="_blank" rel="external">https://micro.mu/blog/</a><br><a href="https://wuyin.io/2018/05/10/microservices-part-1-introduction-and-consignment-service/" target="_blank" rel="external">https://wuyin.io/2018/05/10/microservices-part-1-introduction-and-consignment-service/</a></p>]]></content>
<summary type="html">
<h1 id="网站"><a href="#网站" class="headerlink" title="网站"></a>网站</h1><p><a href="https://micro.mu/blog/" target="_blank" rel="external">https:
</summary>
<category term="微服务" scheme="http://zhourudong.cn/tags/%E5%BE%AE%E6%9C%8D%E5%8A%A1/"/>
</entry>
<entry>
<title>常用命令和工具</title>
<link href="http://zhourudong.cn/2018/09/06/67-%E5%B8%B8%E7%94%A8%E5%91%BD%E4%BB%A4%E5%92%8C%E5%B7%A5%E5%85%B7/"/>
<id>http://zhourudong.cn/2018/09/06/67-常用命令和工具/</id>
<published>2018-09-06T10:52:21.000Z</published>
<updated>2023-12-11T07:18:57.699Z</updated>
<content type="html"><![CDATA[<h1 id="网站"><a href="#网站" class="headerlink" title="网站"></a>网站</h1><p>iptraf-ng</p><h1 id="git-拉取所有远程分支"><a href="#git-拉取所有远程分支" class="headerlink" title="git 拉取所有远程分支"></a>git 拉取所有远程分支</h1><figure class="highlight plain"><table><tr><td class="code"><pre><span class="line">git branch -r | grep -v '\->' | while read remote; do git branch --track "${remote#origin/}" "$remote"; done</span><br><span class="line">git fetch --all</span><br><span class="line">git pull --all</span><br></pre></td></tr></table></figure><h1 id="谷歌浏览历史记录查看-导出"><a href="#谷歌浏览历史记录查看-导出" class="headerlink" title="谷歌浏览历史记录查看 导出"></a>谷歌浏览历史记录查看 导出</h1><p>History Trends Unlimited</p>]]></content>
<summary type="html">
<h1 id="网站"><a href="#网站" class="headerlink" title="网站"></a>网站</h1><p>iptraf-ng</p>
<h1 id="git-拉取所有远程分支"><a href="#git-拉取所有远程分支" class="hea
</summary>
<category term="命令工具" scheme="http://zhourudong.cn/tags/%E5%91%BD%E4%BB%A4%E5%B7%A5%E5%85%B7/"/>
</entry>
<entry>
<title>GraphQL学习</title>
<link href="http://zhourudong.cn/2018/09/05/65-GraphQL%E5%AD%A6%E4%B9%A0/"/>
<id>http://zhourudong.cn/2018/09/05/65-GraphQL学习/</id>
<published>2018-09-05T06:17:52.000Z</published>
<updated>2023-12-11T07:18:57.699Z</updated>
<content type="html"><![CDATA[<h1 id="概念"><a href="#概念" class="headerlink" title="概念"></a>概念</h1><h2 id="Schema"><a href="#Schema" class="headerlink" title="Schema"></a>Schema</h2><p>服务端定义</p><h2 id="Query"><a href="#Query" class="headerlink" title="Query"></a>Query</h2>]]></content>
<summary type="html">
<h1 id="概念"><a href="#概念" class="headerlink" title="概念"></a>概念</h1><h2 id="Schema"><a href="#Schema" class="headerlink" title="Schema"></a>S
</summary>
<category term="GraphQL" scheme="http://zhourudong.cn/tags/GraphQL/"/>
</entry>
<entry>
<title>ununtu常用</title>
<link href="http://zhourudong.cn/2018/08/16/64-ununtu%E5%B8%B8%E7%94%A8/"/>
<id>http://zhourudong.cn/2018/08/16/64-ununtu常用/</id>
<published>2018-08-16T03:40:38.000Z</published>
<updated>2023-12-11T07:18:57.699Z</updated>
<content type="html"><![CDATA[<p># </p><blockquote><p>已安装软件文件展开</p></blockquote><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">dpkg -L kubelet</span><br></pre></td></tr></table></figure><blockquote><p>添加源</p></blockquote><figure class="highlight plain"><table><tr><td class="code"><pre><span class="line">apt-get update && apt-get install -y apt-transport-https</span><br><span class="line">curl https://mirrors.aliyun.com/kubernetes/apt/doc/apt-key.gpg | apt-key add - </span><br><span class="line">cat <<EOF >/etc/apt/sources.list.d/kubernetes.list</span><br><span class="line">deb https://mirrors.aliyun.com/kubernetes/apt/ kubernetes-xenial main</span><br><span class="line">EOF </span><br><span class="line">apt-get update</span><br></pre></td></tr></table></figure>]]></content>
<summary type="html">
<p># </p>
<blockquote>
<p>已安装软件文件展开</p>
</blockquote>
<figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">dpk
</summary>
<category term="ubuntu" scheme="http://zhourudong.cn/tags/ubuntu/"/>
</entry>
<entry>
<title>python中的类和object</title>
<link href="http://zhourudong.cn/2018/07/12/63-python%E4%B8%AD%E7%9A%84%E7%B1%BB%E5%92%8Cobject/"/>
<id>http://zhourudong.cn/2018/07/12/63-python中的类和object/</id>
<published>2018-07-12T02:15:43.000Z</published>
<updated>2023-12-11T07:18:57.698Z</updated>
<content type="html"><![CDATA[<figure class="highlight python"><table><tr><td class="code"><pre><span class="line">In [<span class="number">1</span>]: i = <span class="number">1</span></span><br><span class="line"></span><br><span class="line">In [<span class="number">2</span>]: s = <span class="string">'字符'</span></span><br><span class="line"></span><br><span class="line">In [<span class="number">3</span>]: alist=[<span class="string">'1'</span>,<span class="number">1</span>]</span><br><span class="line"></span><br><span class="line">In [<span class="number">4</span>]: adict={<span class="string">'one'</span>:<span class="number">1</span>}</span><br><span class="line"></span><br><span class="line">In [<span class="number">5</span>]: aset={<span class="number">1</span>,<span class="number">2</span>}</span><br><span class="line"></span><br><span class="line">In [<span class="number">6</span>]: type(i)</span><br><span class="line">Out[<span class="number">6</span>]: int</span><br><span class="line"></span><br><span class="line">In [<span class="number">7</span>]: type(s)</span><br><span class="line">Out[<span class="number">7</span>]: str</span><br><span class="line"></span><br><span class="line">In [<span class="number">8</span>]: type(alist)</span><br><span class="line">Out[<span class="number">8</span>]: list</span><br><span class="line"></span><br><span class="line">In [<span class="number">9</span>]: type(adict)</span><br><span class="line">Out[<span class="number">9</span>]: dict</span><br><span class="line"></span><br><span class="line">In [<span class="number">10</span>]: type(aset)</span><br><span class="line">Out[<span class="number">10</span>]: set</span><br></pre></td></tr></table></figure><figure class="highlight python"><table><tr><td class="code"><pre><span class="line">In [<span class="number">11</span>]: i.__class__</span><br><span class="line">Out[<span class="number">11</span>]: int</span><br><span class="line"></span><br><span class="line">In [<span class="number">12</span>]: s.__class__</span><br><span class="line">Out[<span class="number">12</span>]: str</span><br><span class="line"></span><br><span class="line">In [<span class="number">13</span>]: alist.__class__</span><br><span class="line">Out[<span class="number">13</span>]: list</span><br></pre></td></tr></table></figure><figure class="highlight python"><table><tr><td class="code"><pre><span class="line">In [<span class="number">17</span>]: int.__class__</span><br><span class="line">Out[<span class="number">17</span>]: type</span><br><span class="line"></span><br><span class="line">In [<span class="number">18</span>]: str.__class__</span><br><span class="line">Out[<span class="number">18</span>]: type</span><br></pre></td></tr></table></figure><figure class="highlight python"><table><tr><td class="code"><pre><span class="line">In [<span class="number">19</span>]: type.__class__</span><br><span class="line">Out[<span class="number">19</span>]: type</span><br></pre></td></tr></table></figure><figure class="highlight plain"><table><tr><td class="code"><pre><span class="line">In [20]: object.__class__</span><br><span class="line">Out[20]: type</span><br></pre></td></tr></table></figure><figure class="image-bubble"> <div class="img-lightbox"> <div class="overlay"></div> <img src="img/type_class_instance.png" alt title> </div> <div class="image-caption"></div> </figure>]]></content>
<summary type="html">
<figure class="highlight python"><table><tr><td class="code"><pre><span class="line">In [<span class="number">1</span>]: i = <span class="nu
</summary>
<category term="python class object" scheme="http://zhourudong.cn/tags/python-class-object/"/>
</entry>
<entry>
<title>linux_tips</title>
<link href="http://zhourudong.cn/2018/07/11/62-linux-tips/"/>
<id>http://zhourudong.cn/2018/07/11/62-linux-tips/</id>
<published>2018-07-11T04:44:50.000Z</published>
<updated>2023-12-11T07:18:57.698Z</updated>
<content type="html"><![CDATA[<h1 id="tar-ssh传输文件"><a href="#tar-ssh传输文件" class="headerlink" title="tar + ssh传输文件"></a>tar + ssh传输文件</h1><p>(引用)[<a href="https://serverfault.com/questions/326490/running-multiple-scp-threads-simultaneously]" target="_blank" rel="external">https://serverfault.com/questions/326490/running-multiple-scp-threads-simultaneously]</a></p><p>I would do it like this:<br><code>tar -cf - /manyfiles | ssh dest.server 'tar -xf - -C /manyfiles'</code></p><p>Depending on the files you are transferring it can make sense to enable compression in the <code>tar</code>commands:<br><code>tar -czf - /manyfiles | ssh dest.server 'tar -xzf - -C /manyfiles'</code></p><p>It may also make sense that you choose a CPU friendlier cipher for the <code>ssh</code> command (like arcfour):<code>tar -cf - /manyfiles | ssh -c arcfour dest.server 'tar -xf - -C /manyfiles'</code></p><p>Or combine both of them, but it really depends on what your bottleneck is.<br>Obviously <code>rsync</code> will be a lot faster if you are doing incremental syncs.</p><h1 id="expect-捕捉ssh自动输入"><a href="#expect-捕捉ssh自动输入" class="headerlink" title="expect 捕捉ssh自动输入"></a>expect 捕捉ssh自动输入</h1><figure class="highlight shell"><table><tr><td class="code"><pre><span class="line">sudo yum install -y expect</span><br></pre></td></tr></table></figure><ul><li>批量ssh公钥往目标机上传</li></ul><figure class="highlight shell"><table><tr><td class="code"><pre><span class="line"><span class="meta">#</span><span class="bash">!/usr/bin/expect -f</span></span><br><span class="line"></span><br><span class="line">set login "install"</span><br><span class="line">set addr [lindex $argv 0]</span><br><span class="line">set pw [lindex $argv 1]</span><br><span class="line">spawn ssh-copyid $login@$addr</span><br><span class="line">expect "*yes/no*" {</span><br><span class="line"> send "yes\r"</span><br><span class="line"> expect "*?assword*" { send "$pw\r" }</span><br><span class="line"> } "*?asswor*" { send "$pw\r" }</span><br><span class="line">interact</span><br></pre></td></tr></table></figure><figure class="highlight shell"><table><tr><td class="code"><pre><span class="line"><span class="meta">#</span><span class="bash">!/bin/bash</span></span><br><span class="line"></span><br><span class="line">password=`cat /root/installpassword.txt`</span><br><span class="line"></span><br><span class="line">for j in 10 11 12 13 14 15 16 17 18 19 20 </span><br><span class="line">do</span><br><span class="line"></span><br><span class="line">./expectscript 192.168.1.$j $password</span><br><span class="line"></span><br><span class="line">done</span><br></pre></td></tr></table></figure>]]></content>
<summary type="html">
<h1 id="tar-ssh传输文件"><a href="#tar-ssh传输文件" class="headerlink" title="tar + ssh传输文件"></a>tar + ssh传输文件</h1><p>(引用)[<a href="https://serverfa
</summary>
<category term="linux" scheme="http://zhourudong.cn/tags/linux/"/>
</entry>
<entry>
<title>tomcat多实例</title>
<link href="http://zhourudong.cn/2018/06/29/61-tomcat%E5%A4%9A%E5%AE%9E%E4%BE%8B-nginx/"/>
<id>http://zhourudong.cn/2018/06/29/61-tomcat多实例-nginx/</id>
<published>2018-06-29T09:40:15.000Z</published>
<updated>2023-12-11T07:18:57.698Z</updated>
<content type="html"><![CDATA[<h1 id="用户"><a href="#用户" class="headerlink" title="用户"></a>用户</h1><p>useradd -s /sbin/nologin tomcat</p><h1 id="安装jdk"><a href="#安装jdk" class="headerlink" title="安装jdk"></a>安装jdk</h1><p>设置JAVA_HOME等环境变量</p><p><code>sed -i 's#securerandom.source=file:/dev/random#securerandom.source=file:/dev/./urandom#g' "$JAVA_HOME/jre/lib/security/java.security"</code></p><h1 id="安装tomcat"><a href="#安装tomcat" class="headerlink" title="安装tomcat"></a>安装tomcat</h1><p>复制两份<code>tomcat</code>到<code>/usr/local/</code>目录下</p><figure class="highlight plain"><table><tr><td class="code"><pre><span class="line">[root@zrd /usr/local]# ls tomcat*</span><br><span class="line">tomcat1:</span><br><span class="line">bin conf lib LICENSE logs NOTICE RELEASE-NOTES RUNNING.txt temp webapps work</span><br><span class="line"></span><br><span class="line">tomcat2:</span><br><span class="line">bin conf lib LICENSE logs NOTICE RELEASE-NOTES RUNNING.txt temp webapps work</span><br></pre></td></tr></table></figure><p><code>chown -R tomcat /usr/local/tomcat*</code></p><h2 id="配置"><a href="#配置" class="headerlink" title="配置"></a>配置</h2><ul><li><strong><code>pid</code></strong></li></ul><p><code>mkdir -p /var/run/tomcat && chown tomcat.tomcat -R /var/run/tomcat && chmod 600 /var/run/tomcat</code></p><p><code>sed -i '/cygwin=false/i\CATALINA_PID=/var/run/tomcat/tomcat1.pid' /usr/local/tomcat1/bin/catalina.sh</code></p><p><code>sed -i '/cygwin=false/i\CATALINA_PID=/var/run/tomcat/tomcat2.pid' /usr/local/tomcat2/bin/catalina.sh</code></p><p><code>grep CATALINA_PID= /usr/local/tomcat1/bin/catalina.sh</code></p><p><code>grep CATALINA_PID= /usr/local/tomcat2/bin/catalina.sh</code></p><ul><li><strong><code>logs</code></strong></li></ul><blockquote><p><strong><code>tomcat1</code></strong></p></blockquote><p><code>sed -i 's#${catalina.base}/logs#/home/weblog/tomcat1#g' /usr/local/tomcat1/conf/logging.properties</code></p><p><code>grep tomcat1 /usr/local/tomcat1/conf/logging.properties</code></p><p><code>sed -i 's#CATALINA_OUT="$CATALINA_BASE"/logs/catalina.out#CATALINA_OUT=/home/weblog/tomcat1/catalina.out#g' /usr/local/tomcat1/bin/catalina.sh</code></p><p><code>grep CATALINA_OUT= /usr/local/tomcat1/bin/catalina.sh</code></p><p><code>sed -i 's#directory="logs"#directory="/home/weblog/tomcat1"#g' /usr/local/tomcat1/conf/server.xml</code></p><p><code>grep /home/weblog/tomcat1 /usr/local/tomcat1/conf/server.xml</code></p><blockquote><p><strong><code>tomat2</code></strong></p></blockquote><p><code>sed -i 's#${catalina.base}/logs#/home/weblog/tomcat2#g' /usr/local/tomcat2/conf/logging.properties</code></p><p><code>grep tomcat2 /usr/local/tomcat2/conf/logging.properties</code></p><p><code>sed -i 's#CATALINA_OUT="$CATALINA_BASE"/logs/catalina.out#CATALINA_OUT=/home/weblog/tomcat2/catalina.out#g' /usr/local/tomcat2/bin/catalina.sh</code></p><p><code>grep CATALINA_OUT= /usr/local/tomcat2/bin/catalina.sh</code></p><p><code>sed -i 's#directory="logs"#directory="/home/weblog/tomcat2"#g' /usr/local/tomcat2/conf/server.xml</code></p><p><code>grep /home/weblog/tomcat2 /usr/local/tomcat2/conf/server.xml</code></p><ul><li><strong><code>监听端口</code></strong></li></ul><blockquote><p><strong><code>tomat1</code></strong></p></blockquote><p><code>sed -i 's#<Server port="8005" shutdown="SHUTDOWN">#<Server port="18005" shutdown="tomcat1">#g' /usr/local/tomcat1/conf/server.xml</code><br><code>grep shutdown= /usr/local/tomcat1/conf/server.xml</code></p><p><code>sed -i 's#<Connector port="8080"#<Connector port="18080"#g' /usr/local/tomcat1/conf/server.xml</code><br><code>grep 'Connector port="18080"' /usr/local/tomcat1/conf/server.xml</code></p><p><code>sed -i 's#redirectPort="8443"#redirectPort="18443"#g' /usr/local/tomcat1/conf/server.xml</code><br><code>grep 'redirectPort=' /usr/local/tomcat1/conf/server.xml</code> </p><p><code>sed -i 's#<Connector port="8009"#<Connector port="18009"#g' /usr/local/tomcat1/conf/server.xml</code><br><code>grep 18009 /usr/local/tomcat1/conf/server.xml</code></p><blockquote><p><strong><code>tomat2</code></strong></p></blockquote><p><code>sed -i 's#<Server port="8005" shutdown="SHUTDOWN">#<Server port="18006" shutdown="tomcat2">#g' /usr/local/tomcat2/conf/server.xml</code><br><code>grep shutdown= /usr/local/tomcat2/conf/server.xml</code></p><p><code>sed -i 's#<Connector port="8080"#<Connector port="18081"#g' /usr/local/tomcat2/conf/server.xml</code><br><code>grep 'Connector port="18081"' /usr/local/tomcat2/conf/server.xml</code></p><p><code>sed -i 's#redirectPort="8443"#redirectPort="18444"#g' /usr/local/tomcat2/conf/server.xml</code><br><code>grep 'redirectPort=' /usr/local/tomcat2/conf/server.xml</code></p><p><code>sed -i 's#<Connector port="8009"#<Connector port="18010"#g' /usr/local/tomcat2/conf/server.xml</code><br><code>grep 18010 /usr/local/tomcat2/conf/server.xml</code></p><h2 id="启动脚本"><a href="#启动脚本" class="headerlink" title="启动脚本"></a>启动脚本</h2><blockquote><p><strong>tomcat1</strong></p></blockquote><figure class="highlight plain"><table><tr><td class="code"><pre><span class="line">cat >/usr/lib/systemd/system/tomcat1.service<< 'EOF' </span><br><span class="line">[Unit]</span><br><span class="line">Description=tomcat1</span><br><span class="line">After=syslog.target network.target</span><br><span class="line"></span><br><span class="line">[Service]</span><br><span class="line">Type=forking</span><br><span class="line"></span><br><span class="line"># Environment=JAVA_HOME=/usr/lib/jvm/java-8-oracle/</span><br><span class="line"># Environment='CATALINA_OPTS=-Xms512M -Xmx1024M -server -XX:+UseParallelGC'</span><br><span class="line"># Environment='JAVA_OPTS=-Djava.awt.headless=true -Djava.security.egd=file:/dev/./urandom'</span><br><span class="line"></span><br><span class="line">Environment=CATALINA_PID=/var/run/tomcat/tomcat1.pid</span><br><span class="line">Environment=CATALINA_HOME=/usr/local/tomcat1</span><br><span class="line">Environment=CATALINA_BASE=/usr/local/tomcat1</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">ExecStart=/usr/local/tomcat1/bin/startup.sh</span><br><span class="line">ExecStop=/bin/kill -15 $MAINPID</span><br><span class="line"></span><br><span class="line">User=tomcat</span><br><span class="line">Group=tomcat</span><br><span class="line">UMask=0007</span><br><span class="line">RestartSec=10</span><br><span class="line">Restart=always</span><br><span class="line"></span><br><span class="line"># 限制20%以内占用率</span><br><span class="line"># CPUQuota=20%</span><br><span class="line"># 可以使用低于1024端口</span><br><span class="line"># AmbientCapabilities=CAP_NET_BIND_SERVICE</span><br><span class="line">[Install]</span><br><span class="line">WantedBy=multi-user.target</span><br><span class="line">EOF</span><br></pre></td></tr></table></figure><blockquote><p><strong>tomcat2</strong></p></blockquote><figure class="highlight plain"><table><tr><td class="code"><pre><span class="line">cat >/usr/lib/systemd/system/tomcat2.service<< 'EOF' </span><br><span class="line">[Unit]</span><br><span class="line">Description=tomcat2</span><br><span class="line">After=syslog.target network.target</span><br><span class="line"></span><br><span class="line">[Service]</span><br><span class="line">Type=forking</span><br><span class="line"></span><br><span class="line"># Environment=JAVA_HOME=/usr/lib/jvm/java-8-oracle/</span><br><span class="line"># Environment='CATALINA_OPTS=-Xms512M -Xmx1024M -server -XX:+UseParallelGC'</span><br><span class="line"># Environment='JAVA_OPTS=-Djava.awt.headless=true -Djava.security.egd=file:/dev/./urandom'</span><br><span class="line"></span><br><span class="line">Environment=CATALINA_PID=/var/run/tomcat/tomcat2.pid</span><br><span class="line">Environment=CATALINA_HOME=/usr/local/tomcat2</span><br><span class="line">Environment=CATALINA_BASE=/usr/local/tomcat2</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">ExecStart=/usr/local/tomcat2/bin/startup.sh</span><br><span class="line">ExecStop=/bin/kill -15 $MAINPID</span><br><span class="line"></span><br><span class="line">User=tomcat</span><br><span class="line">Group=tomcat</span><br><span class="line">UMask=0007</span><br><span class="line">RestartSec=10</span><br><span class="line">Restart=always</span><br><span class="line"></span><br><span class="line"># 限制20%以内占用率</span><br><span class="line"># CPUQuota=20%</span><br><span class="line"># 可以使用低于1024端口</span><br><span class="line"># AmbientCapabilities=CAP_NET_BIND_SERVICE</span><br><span class="line">[Install]</span><br><span class="line">WantedBy=multi-user.target</span><br><span class="line">EOF</span><br></pre></td></tr></table></figure><p><code>systemctl daemon-reload</code></p><p><code>systemctl cat tomcat1</code></p><p><code>systemctl cat tomcat2</code></p><h2 id="tomcat-项目存放目录"><a href="#tomcat-项目存放目录" class="headerlink" title="tomcat 项目存放目录"></a>tomcat 项目存放目录</h2><p><code>mkdir -pv /home/wwwroot/{tomcat1,tomcat2}</code></p><p><code>chown -R tomcat.tomcat /home/wwwroot</code></p>]]></content>
<summary type="html">
<h1 id="用户"><a href="#用户" class="headerlink" title="用户"></a>用户</h1><p>useradd -s /sbin/nologin tomcat</p>
<h1 id="安装jdk"><a href="#安装jdk" cl
</summary>
<category term="tomcat" scheme="http://zhourudong.cn/tags/tomcat/"/>
</entry>
</feed>