-
Notifications
You must be signed in to change notification settings - Fork 0
/
centos-hadoop-ge-shi-hua-ji-qi-dong.html
530 lines (231 loc) · 19.1 KB
/
centos-hadoop-ge-shi-hua-ji-qi-dong.html
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
<!DOCTYPE HTML>
<html lang="" >
<head>
<title>Centos Hadoop 格式化及启动 · GitBook</title>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<meta name="description" content="">
<meta name="generator" content="GitBook 3.1.1">
<link rel="stylesheet" href="gitbook/style.css">
<link rel="stylesheet" href="gitbook/gitbook-plugin-highlight/website.css">
<link rel="stylesheet" href="gitbook/gitbook-plugin-search/search.css">
<link rel="stylesheet" href="gitbook/gitbook-plugin-fontsettings/website.css">
<meta name="HandheldFriendly" content="true"/>
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="gitbook/images/apple-touch-icon-precomposed-152.png">
<link rel="shortcut icon" href="gitbook/images/favicon.ico" type="image/x-icon">
<link rel="next" href="centos-hadoop-quan-fen-bu-shi-ji-qun-da-jian.html" />
<link rel="prev" href="centos-wei-fen-bu-mo-shi-pei-zhi.html" />
</head>
<body>
<div class="book">
<div class="book-summary">
<div id="book-search-input" role="search">
<input type="text" placeholder="Type to search" />
</div>
<nav role="navigation">
<ul class="summary">
<li class="chapter " data-level="1.1" data-path="./">
<a href="./">
Centos Hadoop
</a>
<ul class="articles">
<li class="chapter " data-level="1.1.1" data-path="centos-jdk-an-zhuang.html">
<a href="centos-jdk-an-zhuang.html">
Centos JDK 安装
</a>
</li>
<li class="chapter " data-level="1.1.2" data-path="centos-hadoop-an-zhuang.html">
<a href="centos-hadoop-an-zhuang.html">
Centos Hadoop 安装
</a>
</li>
<li class="chapter " data-level="1.1.3" data-path="centos-pei-zhi-ji-jian-cha-ssh.html">
<a href="centos-pei-zhi-ji-jian-cha-ssh.html">
Centos 配置及检查SSH
</a>
</li>
<li class="chapter " data-level="1.1.4" data-path="centos-wei-fen-bu-mo-shi-pei-zhi.html">
<a href="centos-wei-fen-bu-mo-shi-pei-zhi.html">
Centos 伪分布模式配置
</a>
</li>
<li class="chapter active" data-level="1.1.5" data-path="centos-hadoop-ge-shi-hua-ji-qi-dong.html">
<a href="centos-hadoop-ge-shi-hua-ji-qi-dong.html">
Centos Hadoop 格式化及启动
</a>
</li>
<li class="chapter " data-level="1.1.6" data-path="centos-hadoop-quan-fen-bu-shi-ji-qun-da-jian.html">
<a href="centos-hadoop-quan-fen-bu-shi-ji-qun-da-jian.html">
Centos Hadoop 全分布式集群搭建
</a>
<ul class="articles">
<li class="chapter " data-level="1.1.6.1" data-path="centos-hadoop-quan-fen-bu-shi-ji-qun-da-jian/chuang-jian-xin-yong-hu.html">
<a href="centos-hadoop-quan-fen-bu-shi-ji-qun-da-jian/chuang-jian-xin-yong-hu.html">
创建新用户
</a>
</li>
<li class="chapter " data-level="1.1.6.2" data-path="centos-hadoop-quan-fen-bu-shi-ji-qun-da-jian/she-zhi-zhu-ji-ming-yu-yu-ming-jie-xi.html">
<a href="centos-hadoop-quan-fen-bu-shi-ji-qun-da-jian/she-zhi-zhu-ji-ming-yu-yu-ming-jie-xi.html">
设置主机名与域名解析
</a>
</li>
<li class="chapter " data-level="1.1.6.3" data-path="centos-hadoop-quan-fen-bu-shi-ji-qun-da-jian/ssh-mian-mi-deng-lu.html">
<a href="centos-hadoop-quan-fen-bu-shi-ji-qun-da-jian/ssh-mian-mi-deng-lu.html">
SSH 免密登录
</a>
</li>
<li class="chapter " data-level="1.1.6.4" data-path="centos-hadoop-quan-fen-bu-shi-ji-qun-da-jian/an-zhuang-openjdk.html">
<a href="centos-hadoop-quan-fen-bu-shi-ji-qun-da-jian/an-zhuang-openjdk.html">
安装 OpenJDK
</a>
</li>
<li class="chapter " data-level="1.1.6.5" data-path="centos-hadoop-quan-fen-bu-shi-ji-qun-da-jian/hadoop-an-zhuang-yu-pei-zhi.html">
<a href="centos-hadoop-quan-fen-bu-shi-ji-qun-da-jian/hadoop-an-zhuang-yu-pei-zhi.html">
Hadoop 安装与配置
</a>
</li>
<li class="chapter " data-level="1.1.6.6" data-path="centos-hadoop-quan-fen-bu-shi-ji-qun-da-jian/pei-zhi-ji-qun.html">
<a href="centos-hadoop-quan-fen-bu-shi-ji-qun-da-jian/pei-zhi-ji-qun.html">
配置集群
</a>
</li>
<li class="chapter " data-level="1.1.6.7" data-path="centos-hadoop-quan-fen-bu-shi-ji-qun-da-jian/ji-qun-cao-zuo.html">
<a href="centos-hadoop-quan-fen-bu-shi-ji-qun-da-jian/ji-qun-cao-zuo.html">
集群操作
</a>
</li>
<li class="chapter " data-level="1.1.6.8" data-path="centos-hadoop-quan-fen-bu-shi-ji-qun-da-jian/an-zhuang-zookeeper.html">
<a href="centos-hadoop-quan-fen-bu-shi-ji-qun-da-jian/an-zhuang-zookeeper.html">
安装 Zookeeper
</a>
</li>
<li class="chapter " data-level="1.1.6.9" data-path="centos-hadoop-quan-fen-bu-shi-ji-qun-da-jian/hadoop-ha-da-jian.html">
<a href="centos-hadoop-quan-fen-bu-shi-ji-qun-da-jian/hadoop-ha-da-jian.html">
Hadoop HA 搭建
</a>
</li>
<li class="chapter " data-level="1.1.6.10" data-path="centos-hadoop-quan-fen-bu-shi-ji-qun-da-jian/hadoop-ha-chu-ci-qi-dong.html">
<a href="centos-hadoop-quan-fen-bu-shi-ji-qun-da-jian/hadoop-ha-chu-ci-qi-dong.html">
Hadoop HA 初次启动
</a>
</li>
<li class="chapter " data-level="1.1.6.11" data-path="centos-hadoop-quan-fen-bu-shi-ji-qun-da-jian/hadoop-ha-fei-chu-ci-qi-dong.html">
<a href="centos-hadoop-quan-fen-bu-shi-ji-qun-da-jian/hadoop-ha-fei-chu-ci-qi-dong.html">
Hadoop HA 非初次启动
</a>
</li>
<li class="chapter " data-level="1.1.6.12" data-path="centos-hadoop-quan-fen-bu-shi-ji-qun-da-jian/chang-jian-cuo-wu-ji-jie-jue-fang-fa.html">
<a href="centos-hadoop-quan-fen-bu-shi-ji-qun-da-jian/chang-jian-cuo-wu-ji-jie-jue-fang-fa.html">
常见错误及解决方法
</a>
</li>
</ul>
</li>
<li class="chapter " data-level="1.1.7" data-path="centos-chang-yong-pei-zhi-ji-ming-ling.html">
<a href="centos-chang-yong-pei-zhi-ji-ming-ling.html">
Centos 常用配置及命令
</a>
</li>
</ul>
</li>
<li class="divider"></li>
<li>
<a href="https://www.gitbook.com" target="blank" class="gitbook-link">
Published with GitBook
</a>
</li>
</ul>
</nav>
</div>
<div class="book-body">
<div class="body-inner">
<div class="book-header" role="navigation">
<!-- Title -->
<h1>
<i class="fa fa-circle-o-notch fa-spin"></i>
<a href="." >Centos Hadoop 格式化及启动</a>
</h1>
</div>
<div class="page-wrapper" tabindex="-1" role="main">
<div class="page-inner">
<div id="book-search-results">
<div class="search-noresults">
<section class="normal markdown-section">
<h1 id="centos-hadoop-格式化及启动">Centos Hadoop 格式化及启动</h1>
<p>1.修改 Hadoop 配置文件,手动指定 JAVA_HOME 环境变量</p>
<pre><code>#cd ${HADOOP_HOME}/etc/hadoop/hadoop-env.sh
...
export JAVA_HOME="/usr/local/jdk1.7.0_79/"
...
</code></pre><p>2.格式化 HDFS 文件系统</p>
<pre><code>#hadoop namenode -format
...
17/10/06 17:31:30 INFO namenode.FSImage: Allocated new BlockPoolId: BP-397656705-192.168.31.200-1507282289998
17/10/06 17:31:30 INFO common.Storage: Storage directory /tmp/hadoop-lipengxiang/dfs/name has been successfully formatted.
17/10/06 17:31:30 INFO namenode.FSImageFormatProtobuf: Saving image file /tmp/hadoop-lipengxiang/dfs/name/current/fsimage.ckpt_0000000000000000000 using no compression
17/10/06 17:31:30 INFO namenode.FSImageFormatProtobuf: Image file /tmp/hadoop-lipengxiang/dfs/name/current/fsimage.ckpt_0000000000000000000 of size 328 bytes saved in 0 seconds.
17/10/06 17:31:30 INFO namenode.NNStorageRetentionManager: Going to retain 1 images with txid >= 0
17/10/06 17:31:30 INFO util.ExitUtil: Exiting with status 0
17/10/06 17:31:30 INFO namenode.NameNode: SHUTDOWN_MSG:
...
</code></pre><p>3.启动 Hadoop 脚本</p>
<pre><code>#start-dfs.sh //NameNode、DataNode、SecondaryNameNode
#start-yarn.sh //ResourceManager、NodeManager
</code></pre><p>4.检查启动是否成功</p>
<pre><code>#jps
4303 ResourceManager
3967 DataNode
3894 NameNode
4413 Jps
4060 SecondaryNameNode
4381 NodeManager
</code></pre><p>5.通过 WebUI 查看 Hadoop 文件系统</p>
<pre><code>http://localhost:50070/
</code></pre><p>6.停止 Hadoop 脚本</p>
<pre><code>#stop-dfs.sh
#stop-yarn.sh
</code></pre>
</section>
</div>
<div class="search-results">
<div class="has-results">
<h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
<ul class="search-results-list"></ul>
</div>
<div class="no-results">
<h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
</div>
</div>
</div>
</div>
</div>
</div>
<a href="centos-wei-fen-bu-mo-shi-pei-zhi.html" class="navigation navigation-prev " aria-label="Previous page: Centos 伪分布模式配置">
<i class="fa fa-angle-left"></i>
</a>
<a href="centos-hadoop-quan-fen-bu-shi-ji-qun-da-jian.html" class="navigation navigation-next " aria-label="Next page: Centos Hadoop 全分布式集群搭建">
<i class="fa fa-angle-right"></i>
</a>
</div>
<script>
var gitbook = gitbook || [];
gitbook.push(function() {
gitbook.page.hasChanged({"page":{"title":"Centos Hadoop 格式化及启动","level":"1.1.5","depth":2,"next":{"title":"Centos Hadoop 全分布式集群搭建","level":"1.1.6","depth":2,"path":"centos-hadoop-quan-fen-bu-shi-ji-qun-da-jian.md","ref":"centos-hadoop-quan-fen-bu-shi-ji-qun-da-jian.md","articles":[{"title":"创建新用户","level":"1.1.6.1","depth":3,"path":"centos-hadoop-quan-fen-bu-shi-ji-qun-da-jian/chuang-jian-xin-yong-hu.md","ref":"centos-hadoop-quan-fen-bu-shi-ji-qun-da-jian/chuang-jian-xin-yong-hu.md","articles":[]},{"title":"设置主机名与域名解析","level":"1.1.6.2","depth":3,"path":"centos-hadoop-quan-fen-bu-shi-ji-qun-da-jian/she-zhi-zhu-ji-ming-yu-yu-ming-jie-xi.md","ref":"centos-hadoop-quan-fen-bu-shi-ji-qun-da-jian/she-zhi-zhu-ji-ming-yu-yu-ming-jie-xi.md","articles":[]},{"title":"SSH 免密登录","level":"1.1.6.3","depth":3,"path":"centos-hadoop-quan-fen-bu-shi-ji-qun-da-jian/ssh-mian-mi-deng-lu.md","ref":"centos-hadoop-quan-fen-bu-shi-ji-qun-da-jian/ssh-mian-mi-deng-lu.md","articles":[]},{"title":"安装 OpenJDK","level":"1.1.6.4","depth":3,"path":"centos-hadoop-quan-fen-bu-shi-ji-qun-da-jian/an-zhuang-openjdk.md","ref":"centos-hadoop-quan-fen-bu-shi-ji-qun-da-jian/an-zhuang-openjdk.md","articles":[]},{"title":"Hadoop 安装与配置","level":"1.1.6.5","depth":3,"path":"centos-hadoop-quan-fen-bu-shi-ji-qun-da-jian/hadoop-an-zhuang-yu-pei-zhi.md","ref":"centos-hadoop-quan-fen-bu-shi-ji-qun-da-jian/hadoop-an-zhuang-yu-pei-zhi.md","articles":[]},{"title":"配置集群","level":"1.1.6.6","depth":3,"path":"centos-hadoop-quan-fen-bu-shi-ji-qun-da-jian/pei-zhi-ji-qun.md","ref":"centos-hadoop-quan-fen-bu-shi-ji-qun-da-jian/pei-zhi-ji-qun.md","articles":[]},{"title":"集群操作","level":"1.1.6.7","depth":3,"path":"centos-hadoop-quan-fen-bu-shi-ji-qun-da-jian/ji-qun-cao-zuo.md","ref":"centos-hadoop-quan-fen-bu-shi-ji-qun-da-jian/ji-qun-cao-zuo.md","articles":[]},{"title":"安装 Zookeeper","level":"1.1.6.8","depth":3,"path":"centos-hadoop-quan-fen-bu-shi-ji-qun-da-jian/an-zhuang-zookeeper.md","ref":"centos-hadoop-quan-fen-bu-shi-ji-qun-da-jian/an-zhuang-zookeeper.md","articles":[]},{"title":"Hadoop HA 搭建","level":"1.1.6.9","depth":3,"path":"centos-hadoop-quan-fen-bu-shi-ji-qun-da-jian/hadoop-ha-da-jian.md","ref":"centos-hadoop-quan-fen-bu-shi-ji-qun-da-jian/hadoop-ha-da-jian.md","articles":[]},{"title":"Hadoop HA 初次启动","level":"1.1.6.10","depth":3,"path":"centos-hadoop-quan-fen-bu-shi-ji-qun-da-jian/hadoop-ha-chu-ci-qi-dong.md","ref":"centos-hadoop-quan-fen-bu-shi-ji-qun-da-jian/hadoop-ha-chu-ci-qi-dong.md","articles":[]},{"title":"Hadoop HA 非初次启动","level":"1.1.6.11","depth":3,"path":"centos-hadoop-quan-fen-bu-shi-ji-qun-da-jian/hadoop-ha-fei-chu-ci-qi-dong.md","ref":"centos-hadoop-quan-fen-bu-shi-ji-qun-da-jian/hadoop-ha-fei-chu-ci-qi-dong.md","articles":[]},{"title":"常见错误及解决方法","level":"1.1.6.12","depth":3,"path":"centos-hadoop-quan-fen-bu-shi-ji-qun-da-jian/chang-jian-cuo-wu-ji-jie-jue-fang-fa.md","ref":"centos-hadoop-quan-fen-bu-shi-ji-qun-da-jian/chang-jian-cuo-wu-ji-jie-jue-fang-fa.md","articles":[]}]},"previous":{"title":"Centos 伪分布模式配置","level":"1.1.4","depth":2,"path":"centos-wei-fen-bu-mo-shi-pei-zhi.md","ref":"centos-wei-fen-bu-mo-shi-pei-zhi.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["livereload"],"pluginsConfig":{"livereload":{},"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"centos-hadoop-ge-shi-hua-ji-qi-dong.md","mtime":"2017-10-07T08:19:45.000Z","type":"markdown"},"gitbook":{"version":"3.1.1","time":"2017-11-08T04:00:30.420Z"},"basePath":".","book":{"language":""}});
});
</script>
</div>
<script src="gitbook/gitbook.js"></script>
<script src="gitbook/theme.js"></script>
<script src="gitbook/gitbook-plugin-livereload/plugin.js"></script>
<script src="gitbook/gitbook-plugin-search/search-engine.js"></script>
<script src="gitbook/gitbook-plugin-search/search.js"></script>
<script src="gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
<script src="gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
<script src="gitbook/gitbook-plugin-sharing/buttons.js"></script>
<script src="gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
</body>
</html>