-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBig-data-analyst.html
2200 lines (1615 loc) · 134 KB
/
Big-data-analyst.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
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
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html>
<!-- Head -->
<head>
<title>大数据分析师 (比赛) - 我叫史迪奇</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="keywords" content="这是我的博客" />
<meta name="description" content="这是我的窝">
<!-- <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"> -->
<link rel="shortcut icon" href="https://s1.ax1x.com/2023/08/10/pPm8TPO.png" type="image/png" />
<link rel="stylesheet" type="text/css" href="//at.alicdn.com/t/font_2419798_axdw2lrqtkc.css">
<link rel="stylesheet" type="text/css" href="/css/bootstrap-3.3.4.css">
<link rel="stylesheet" href="/css/style.css">
<link rel="stylesheet" type="text/css" href="/css/social/social.css">
<link rel="stylesheet" type="text/css" href="/css/navEffect.css">
<link rel="stylesheet" type="text/css" href="/css/post_content.css">
<script src="/js/jquery1.10.2.min.js"></script>
<script src="/js/app.js"></script>
<script src="/js/bootstrap-3.3.4.js"></script>
<script src="/js/s.js"></script>
<script src="/js/jquery.slimscroll.min.js"></script>
<script src="/js/waline.js"></script>
<link href='https://unpkg.com/@waline/[email protected]/dist/waline.css' rel='stylesheet' />
<script src="/resources/loadingBar/pace.min.js"></script>
<script src="/js/headBand.min.js"></script>
<link rel="stylesheet" href="/resources/loadingBar/flash.css">
<script src="/js/highlight.min.js"></script>
<link rel="stylesheet" href="/css/code-style.css">
<link rel="stylesheet" href="/css/code-styles/sdqlightfair.min.css">
<script src="/js/mermaid.min.js"></script>
<script src="/js/katex.min.js"></script>
<link rel="stylesheet" href="/css/katex.min.css">
<link rel="stylesheet" href="/css/avatar_user.css">
<meta name="generator" content="Hexo 5.3.0"></head>
<!--
<link rel="stylesheet" type="text/css" href="/css/avatar_user.css"> -->
<!-- <script src='https://unpkg.com/@waline/[email protected]/dist/waline.js'></script> -->
<body class="pace-done layout-fullwidth">
<div id="sdq" style= "display:none" >
<!-- Header -->
<nav class="navbar navbar-default navbar-fixed-top">
<div class="brand">
<a>
<i id="sdq-logo" style="font-size:50px;vertical-align: middle;"
class=""></i>
</a>
<a href="/">
<span style="font-size: 20px;">我叫史迪奇</span>
</a>
</div>
<div class="nav-list">
<a href="/" title="首页">
<span>
首页
</span>
</a>
<a href="/about.html" title="关于">
<span>
关于
</span>
</a>
<a href="/valine.html" title="留言">
<span>
留言
</span>
</a>
<a href="/link.html" title="友链">
<span>
友链
</span>
</a>
</div>
<div class="mobile">
<div class="mobile-inner">
<div class="mobile-inner-header">
<div class="mobile-inner-header-icon mobile-inner-header-icon-out">
<span></span><span></span>
</div>
</div>
<div class="mobile-inner-nav">
<a href="/" title="首页">
<span>
首页
</span>
</a>
<a href="/about.html" title="关于">
<span>
关于
</span>
</a>
<a href="/valine.html" title="留言">
<span>
留言
</span>
</a>
<a href="/link.html" title="友链">
<span>
友链
</span>
</a>
</div>
</div>
</div>
<script>
$(window).load(function () {
$(".mobile-inner-header-icon").click(function(){
$(this).toggleClass("mobile-inner-header-icon-click mobile-inner-header-icon-out");
$(".mobile-inner-nav").slideToggle(250);
});
$(".mobile-inner-nav a").each(function( index ) {
$( this ).css({'animation-delay': (index/10)+'s'});
});
});
</script>
<div class="container-fluid">
<div class="navbar-btn" style="padding: 0; padding-top: 10px;">
<button type="button" class="btn-toggle-fullwidth btn-toggle-mx">
<i class="sdqMsDanIconFont"></i>
</button>
</div>
</div>
</nav>
<div id="sidebar-nav" class="sidebar">
<div class="sidebar-scroll">
<div class="sidebar-author">
<a href="/">
<img src="https://s1.ax1x.com/2023/08/10/pPm8IIK.jpg">
<img src="">
</a>
</div>
<nav>
<div class="sdq-count">
<span>文章</span>156
<span>标签</span>0
<span>分类</span>27
</div>
<div class="social-btns">
<a target="_blank" class="btn GitHub" href="https://github.com/sdqOS/">
<i class="sdqMsDanIconFont sdq3 sdqgithub"></i>
</a>
<a target="_blank" class="btn qq" href="https://wpa.qq.com/msgrd?v=3&uin=3083329400&site=qq&menu=yes">
<i class="sdqMsDanIconFont sdq3 sdqqq1"></i>
</a>
</div>
<div class="social-search">
<input id="local-search-input" />
<!-- <button class="sdq3 sdqfeiji"></button> -->
</div>
<style>
.search-result{
display: none;
}
.search-result-list li {
list-style: none;
line-height: 32px;
margin-bottom: 15px;
}
</style>
<div id="local-search-result"></div>
<script>
var search_path = "search.xml";
if (search_path.length == 0) {
search_path = "/search.xml";
}
var path = "/" + search_path;
searchFunc(path, 'local-search-input', 'local-search-result');
</script>
<ul class="nav">
<li>
<a target="_self" href="/" class="iframe_link active"><span>首页</span>
</a>
</li>
<li>
<a id="axis" target="_self" href="/axis.html" class="nav-togg">
<span>时间轴</span>
</a>
</li>
<li>
<a href="javascript:;" class="nav-togg" target="_self" ><span>文章分类</span>
</a>
<div>
<ul>
<li>
<a href="/categories/Android/">Android</a>
<span>4</span>
</li>
<li>
<a href="/categories/CSS/">CSS</a>
<span>11</span>
</li>
<li>
<a href="/categories/C语/">C语</a>
<span>11</span>
</li>
<li>
<a href="/categories/EJS/">EJS</a>
<span>1</span>
</li>
<li>
<a href="/categories/ES6/">ES6</a>
<span>2</span>
</li>
<li>
<a href="/categories/Git/">Git</a>
<span>1</span>
</li>
<li>
<a href="/categories/HTML/">HTML</a>
<span>3</span>
</li>
<li>
<a href="/categories/Java/">Java</a>
<span>7</span>
</li>
<li>
<a href="/categories/JavaScript/">JavaScript</a>
<span>13</span>
</li>
<li>
<a href="/categories/Linux/">Linux</a>
<span>5</span>
</li>
<li>
<a href="/categories/Python/">Python</a>
<span>5</span>
</li>
<li>
<a href="/categories/React/">React</a>
<span>20</span>
</li>
<li>
<a href="/categories/Three-js/">Three.js</a>
<span>3</span>
</li>
<li>
<a href="/categories/TypeScript/">TypeScript</a>
<span>13</span>
</li>
<li>
<a href="/categories/Vue-js/">Vue.js</a>
<span>4</span>
</li>
<li>
<a href="/categories/人工智能/">人工智能</a>
<span>2</span>
</li>
<li>
<a href="/categories/大数据/">大数据</a>
<span>3</span>
</li>
<li>
<a href="/categories/实用软件/">实用软件</a>
<span>1</span>
</li>
<li>
<a href="/categories/小程序开发/">小程序开发</a>
<span>6</span>
</li>
<li>
<a href="/categories/搭建博客/">搭建博客</a>
<span>1</span>
</li>
<li>
<a href="/categories/数据库/">数据库</a>
<span>3</span>
</li>
<li>
<a href="/categories/数据结构/">数据结构</a>
<span>2</span>
</li>
<li>
<a href="/categories/游戏/">游戏</a>
<span>1</span>
</li>
<li>
<a href="/categories/爬虫/">爬虫</a>
<span>23</span>
</li>
<li>
<a href="/categories/算法/">算法</a>
<span>1</span>
</li>
<li>
<a href="/categories/需求分析图/">需求分析图</a>
<span>1</span>
</li>
<li>
<a href="/categories/鲲鹏云/">鲲鹏云</a>
<span>4</span>
</li>
</ul>
</div>
</li>
<li>
<a href="javascript:;" class="nav-togg" target="_self" ><span>最新文章</span>
</a>
<div>
<ul>
<li>
<a href="/photo-video.html">手机照片视频恢复工具</a>
</li>
<li>
<a href="/Dad-n-Me.html">游戏篇 狂扁小朋友修仙版(攻略)</a>
</li>
<li>
<a href="/Spark.html">大数据 Spark</a>
</li>
<li>
<a href="/CSS-Flex.html">CSS Flex样式</a>
</li>
<li>
<a href="/CSS-Static-Relative-Absolute-Fixed-Sticky.html">CSS 定位布局</a>
</li>
</ul>
</div>
</li>
</ul>
</nav>
</div>
</div>
<style>
/* CSS */
.canvas {
position:fixed;
width: 1920px;
height: 862px;
left: -360px;
top: 0;
z-index: -1;
}
</style>
<div class="sdq-bg">
<div class="div_bg"></div>
</div>
<!-- Scripts -->
<script>
// 在这里写你的代码...
(function() {
"use strict";
var $body = document.querySelector('body');
/*$('body').addClass('is-preload'); 添加灰面遮罩,可能存在问题
//$('.sdq-bg').css('background','none'); */
// Methods/polyfills.
// classList | (c) @remy | github.com/remy/polyfills | rem.mit-license.org
!function(){function t(t){this.el=t;for(var n=t.className.replace(/^\s+|\s+$/g,"").split(/\s+/),i=0;i<n.length;i++)e.call(this,n[i])}function n(t,n,i){Object.defineProperty?Object.defineProperty(t,n,{get:i}):t.__defineGetter__(n,i)}if(!("undefined"==typeof window.Element||"classList"in document.documentElement)){var i=Array.prototype,e=i.push,s=i.splice,o=i.join;t.prototype={add:function(t){this.contains(t)||(e.call(this,t),this.el.className=this.toString())},contains:function(t){return-1!=this.el.className.indexOf(t)},item:function(t){return this[t]||null},remove:function(t){if(this.contains(t)){for(var n=0;n<this.length&&this[n]!=t;n++);s.call(this,n,1),this.el.className=this.toString()}},toString:function(){return o.call(this," ")},toggle:function(t){return this.contains(t)?this.remove(t):this.add(t),this.contains(t)}},window.DOMTokenList=t,n(Element.prototype,"classList",function(){return new t(this)})}}();
// canUse
window.canUse=function(p){if(!window._canUse)window._canUse=document.createElement("div");var e=window._canUse.style,up=p.charAt(0).toUpperCase()+p.slice(1);return p in e||"Moz"+up in e||"Webkit"+up in e||"O"+up in e||"ms"+up in e};
// window.addEventListener
(function(){if("addEventListener"in window)return;window.addEventListener=function(type,f){window.attachEvent("on"+type,f)}})();
// 在页面加载时播放初始动画。
window.addEventListener('load', function() {
window.setTimeout(function() {
$body.classList.remove('is-preload');
}, 100);
});
// Slideshow Background.
if (window.addEventListener) { window.addEventListener("load",sdqimgbg, false);}
else if (window.attachEvent) {window.attachEvent("onload",sdqimgbg); }
else{ window.onload =sdqimgbg; }
function sdqimgbg(){
(function() {
// Settings.
var settings = {
// Images (in the format of 'url': 'alignment').
images: {
'': 'center',
'': 'center',
'': 'center',
'': 'center'
},
// Delay.
delay: 6000
};
// Vars.
var pos = 0, lastPos = 0,
$wrapper, $bgs = [], $bg,
k, v;
var $sidebar = document.querySelector('#sidebar-nav');
var $main = document.querySelector('.main');
// Create BG wrapper, BGs.
$wrapper = document.createElement('div');
$wrapper.id = 'bg';
$sidebar.appendChild($wrapper);
//$main.appendChild($wrapper);
for (k in settings.images) {
// Create BG.
$bg = document.createElement('div');
$bg.style.backgroundImage = 'url("' + k + '")';
$bg.style.backgroundPosition = settings.images[k];
$wrapper.appendChild($bg);
// Add it to array.
$bgs.push($bg);
}
// Main loop.
$bgs[pos].classList.add('visible');
$bgs[pos].classList.add('top');
// Bail if we only have a single BG or the client doesn't support transitions.
if ($bgs.length == 1
|| !canUse('transition'))
return;
window.setInterval(function() {
lastPos = pos;
pos++;
// Wrap to beginning if necessary.
if (pos >= $bgs.length)
pos = 0;
// Swap top images.
$bgs[lastPos].classList.remove('top');
$bgs[pos].classList.add('visible');
$bgs[pos].classList.add('top');
}, settings.delay);
})(); // end
}
})();
</script>
<style>
body {
background-color: #000;
}
body.is-preload *, body.is-preload *:before, body.is-preload *:after {
-moz-animation: none !important;
-webkit-animation: none !important;
-ms-animation: none !important;
animation: none !important;
-moz-transition: none !important;
-webkit-transition: none !important;
-ms-transition: none !important;
transition: none !important;
}
/* BG */
#bg {
-moz-transition: opacity 2s ease-in-out;
-webkit-transition: opacity 2s ease-in-out;
-ms-transition: opacity 2s ease-in-out;
transition: opacity 2s ease-in-out;
height: 100%;
left: 0;
opacity: 0.2;
position: fixed;
top: 0;
width: 100%;
z-index: -1;
}
#bg div {
-moz-transition: opacity 3s ease, visibility 3s;
-webkit-transition: opacity 3s ease, visibility 3s;
-ms-transition: opacity 3s ease, visibility 3s;
transition: opacity 3s ease, visibility 3s;
background-size: cover;
height: 100%;
left: 0;
opacity: 0;
position: absolute;
top: 0;
visibility: hidden;
width: 150%;
}
#bg div.visible {
-moz-animation: bg 45s linear infinite;
-webkit-animation: bg 45s linear infinite;
-ms-animation: bg 45s linear infinite;
animation: bg 45s linear infinite;
opacity: 1;
visibility: visible;
z-index: 1;
}
#bg div.visible.top {
z-index: 2;
}
@media screen and (max-width: 1280px) {
#bg div.visible {
-moz-animation: bg 29.25s linear infinite;
-webkit-animation: bg 29.25s linear infinite;
-ms-animation: bg 29.25s linear infinite;
animation: bg 29.25s linear infinite;
}
}
@media screen and (max-width: 736px) {
#bg div.visible {
-moz-animation: bg 18s linear infinite;
-webkit-animation: bg 18s linear infinite;
-ms-animation: bg 18s linear infinite;
animation: bg 18s linear infinite;
}
}
#bg div:only-child {
-moz-animation-direction: alternate !important;
-webkit-animation-direction: alternate !important;
-ms-animation-direction: alternate !important;
animation-direction: alternate !important;
}
body.is-preload #bg {
opacity: 0;
}
@-moz-keyframes bg {
0% {
-moz-transform: translateX(0);
-webkit-transform: translateX(0);
-ms-transform: translateX(0);
transform: translateX(0);
}
100% {
-moz-transform: translateX(-25%);
-webkit-transform: translateX(-25%);
-ms-transform: translateX(-25%);
transform: translateX(-25%);
}
}
@-webkit-keyframes bg {
0% {
-moz-transform: translateX(0);
-webkit-transform: translateX(0);
-ms-transform: translateX(0);
transform: translateX(0);
}
100% {
-moz-transform: translateX(-25%);
-webkit-transform: translateX(-25%);
-ms-transform: translateX(-25%);
transform: translateX(-25%);
}
}
@-ms-keyframes bg {
0% {
-moz-transform: translateX(0);
-webkit-transform: translateX(0);
-ms-transform: translateX(0);
transform: translateX(0);
}
100% {
-moz-transform: translateX(-25%);
-webkit-transform: translateX(-25%);
-ms-transform: translateX(-25%);
transform: translateX(-25%);
}
}
@keyframes bg {
0% {
-moz-transform: translateX(0);
-webkit-transform: translateX(0);
-ms-transform: translateX(0);
transform: translateX(0);
}
100% {
-moz-transform: translateX(-25%);
-webkit-transform: translateX(-25%);
-ms-transform: translateX(-25%);
transform: translateX(-25%);
}
}
</style>
<div class="main">
<div class="main-content">
<style>
#sdqPost:hover{
background-color: rgba(255, 255, 255, 0.5)!important;
}
</style>
<div class="sdq">
<div class="sdq-post" id="sdqPost">
<div class="sdq-title">
<h1>大数据分析师 (比赛)</h1>
</div>
<div id="post" class="sdq-post-Statistics">
<a>2021年10月02日</a>
<a class="post-count">99 字</a>
<a class=" -link" href="/categories/%E5%A4%A7%E6%95%B0%E6%8D%AE/">大数据</a>
</div>
<div id="modal" style="display:none">
<aside id="article-toc" class="fixed-toc">
<div id="article-toc-inner">
<strong class="sidebar-title">目录</strong>
<ol class="toc"><li class="toc-item toc-level-1"><a class="toc-link" href="#1-%E5%AE%89%E8%A3%85%E6%95%B0%E6%8D%AE%E5%BA%93-0-4%E5%88%86"><span class="toc-text">1. 安装数据库(0/4分)</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#2-Hive%E5%9F%BA%E7%A1%80%E7%8E%AF%E5%A2%83%E9%85%8D%E7%BD%AE-0-6%E5%88%86"><span class="toc-text">2. Hive基础环境配置(0/6分)</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#3-%E9%85%8D%E7%BD%AEHIVE%E5%85%83%E6%95%B0%E6%8D%AE%E8%87%B3MySQL-0-6%E5%88%86"><span class="toc-text">3. 配置HIVE元数据至MySQL(0/6分)</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#4-%E9%85%8D%E7%BD%AEHIVE%E5%AE%A2%E6%88%B7%E7%AB%AF-0-3%E5%88%86"><span class="toc-text">4. 配置HIVE客户端(0/3分)</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#5-%E5%90%AF%E5%8A%A8Hive-0-2%E5%88%86"><span class="toc-text">5. 启动Hive(0/2分)</span></a></li></ol>
</div>
</aside>
</div>
<a href="#modal" class="second">
<div class="i">
<i style="font-size:20px" class="sdq3 sdqfasong">
<span style="font-size:0px">
</i>
</div>
</a>
<script>
$(".second .i").mouseover(function(){
$(".second .i span").css("font-size","18px");
});
$(".second .i").mouseleave(function(){
$(".second .i span").css("font-size","0px");
});
</script>
<div>
<article>
<p><strong>大数据比赛文档</strong></p>
<a id="more"></a>
<h1 id="1-安装数据库-0-4分"><a href="#1-安装数据库-0-4分" class="headerlink" title="1. 安装数据库(0/4分)"></a>1. 安装数据库(0/4分)</h1><p><strong><a target="_blank" rel="noopener" href="https://download.csdn.net/download/qq_44948696/28206428">安装mysql的链接</a></strong>,把它放在home或者你知道的地方, 指行以下代码</p>
<figure class="highlight powershell"><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><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br></pre></td><td class="code"><pre><code class="hljs PowerShell"> <span class="hljs-comment"># tar -tzvf解压文件到当前文件夹 -f解压 v日志</span><br>[<span class="hljs-type">root</span>@<span class="hljs-type">localhost</span> ~]<span class="hljs-comment"># tar -zxvf mysql-8.0.26-el7-x86_64.tar.gz </span><br><br> <span class="hljs-comment"># 进入root目录下 </span><br>[<span class="hljs-type">root</span>@<span class="hljs-type">localhost</span> ~]<span class="hljs-comment"># cd /root/</span><br><br> <span class="hljs-comment"># 查看隐藏</span><br>[<span class="hljs-type">root</span>@<span class="hljs-type">localhost</span> ~]<span class="hljs-comment"># ls -a</span><br><br> <span class="hljs-comment"># 用vim或者vi编辑这个目录</span><br>[<span class="hljs-type">root</span>@<span class="hljs-type">localhost</span> ~]<span class="hljs-comment"># vim .bash_profile</span><br><br> <span class="hljs-comment"># 编辑成这样 MYSQL_HOME是自定义名字</span><br> export MYSQL_HOME=/home/sdq/Music/mysql<span class="hljs-literal">-8</span>.<span class="hljs-number">0.26</span><span class="hljs-literal">-el7-x86_64</span>/<br> <span class="hljs-comment"># 在PATH=$PATH:$HOME后面加 /bin:$MYSQL_HOME/bin/</span><br> PATH=<span class="hljs-variable">$PATH:</span><span class="hljs-variable">$HOME</span>/bin:<span class="hljs-variable">$MYSQL_BIN</span>/bin/<br><br> <span class="hljs-comment"># 初始化</span><br>[<span class="hljs-type">root</span>@<span class="hljs-type">localhost</span> ~]<span class="hljs-comment"># mysqld --initialize </span><br><br> <span class="hljs-comment"># 安装</span><br>[<span class="hljs-type">root</span>@<span class="hljs-type">localhost</span> ~]<span class="hljs-comment"># mysqld install Mysql </span><br><br> <span class="hljs-comment"># 启动</span><br>[<span class="hljs-type">root</span>@<span class="hljs-type">localhost</span> ~]<span class="hljs-comment"># service Mysql start </span><br><br> <span class="hljs-comment"># 登陆mysql</span><br>[<span class="hljs-type">root</span>@<span class="hljs-type">localhost</span> ~]<span class="hljs-comment"># mysql -u root -p </span><br></code></pre></td></tr></table></figure>
<p>考核条件如下:<br><strong>(1) 环境中已经安装mysql-community-server, 关闭mysql开机自启服务(0/1)分</strong></p>
<ul>
<li>解释: 这里是已经安装 mysql-community-server 只需要关闭mysql开机自启就行了</li>
</ul>
<figure class="highlight powershell"><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><code class="hljs PowerShell"> <span class="hljs-comment"># 关闭MySql启动服务</span><br>[<span class="hljs-type">root</span>@<span class="hljs-type">localhost</span> ~]<span class="hljs-comment"># systemctl disable mysqld </span><br><br> <span class="hljs-comment"># 一定要重启才生效</span><br>[<span class="hljs-type">root</span>@<span class="hljs-type">localhost</span> ~]<span class="hljs-comment"># reboot</span><br><br> <span class="hljs-comment"># 这是验证mysql的 显示ERROR 2002 (HY000)说明已关闭</span><br>[<span class="hljs-type">root</span>@<span class="hljs-type">localhost</span> ~]<span class="hljs-comment"># mysql</span><br></code></pre></td></tr></table></figure>
<p><strong>(2) 开启MySQL服务(0/1)分</strong></p>
<figure class="highlight powershell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><code class="hljs PowerShell"> <span class="hljs-comment"># 关闭MySql启动服务</span><br>[<span class="hljs-type">root</span>@<span class="hljs-type">localhost</span> ~]<span class="hljs-comment"># service mysqld start </span><br></code></pre></td></tr></table></figure>
<p><strong>(3) 判断mysqld.log日志下是否生成初临时密码(0/1)分</strong></p>
<figure class="highlight powershell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><code class="hljs PowerShell"> <span class="hljs-comment"># 判断mysqld.log日志下是否生成初临时密码</span><br>[<span class="hljs-type">root</span>@<span class="hljs-type">localhost</span> ~]<span class="hljs-comment"># grep 'temporary password' /var/log/mysqld.log </span><br></code></pre></td></tr></table></figure>
<p><strong>(4) 设置mysql数据库本地root用户密码为123456(0/1)分</strong></p>
<figure class="highlight powershell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><code class="hljs PowerShell"> <span class="hljs-comment"># 为root用户设置密码</span><br>[<span class="hljs-type">root</span>@<span class="hljs-type">localhost</span> ~]<span class="hljs-comment"># mysqladmin -u root password 123456 </span><br></code></pre></td></tr></table></figure>
<h1 id="2-Hive基础环境配置-0-6分"><a href="#2-Hive基础环境配置-0-6分" class="headerlink" title="2. Hive基础环境配置(0/6分)"></a>2. Hive基础环境配置(0/6分)</h1><p>考核条件如下:<br><strong>(1) 将Hive安装包解压到指定路径/usr/hive (安装包存放于/usr/package277/) (0/1)分</strong></p>
<figure class="highlight powershell"><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><code class="hljs PowerShell"> <span class="hljs-comment"># 打开 /usr/package277/ 没有路径就新建文件夹</span><br>[<span class="hljs-type">root</span>@<span class="hljs-type">localhost</span> ~]<span class="hljs-comment"># cd /usr/package277/</span><br><br> <span class="hljs-comment"># 安装包存放于/usr/package277/只需要到这里找到 然后解压到指定路径/usr/hive 联系的话</span><br>[<span class="hljs-type">root</span>@<span class="hljs-type">localhost</span> ~]<span class="hljs-comment"># tar -zxvf apache-hive-3.1.2-bin.tar.gz -C /usr/hive</span><br></code></pre></td></tr></table></figure>
<p><strong>(2) 配置环境变量$HIVE_HOME,将bin目录加入PATH系统变量, 注意生效变量(0/1)分</strong></p>
<figure class="highlight powershell"><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></pre></td><td class="code"><pre><code class="hljs PowerShell"> <span class="hljs-comment"># 为root用户设置密码</span><br>[<span class="hljs-type">root</span>@<span class="hljs-type">localhost</span> ~]<span class="hljs-comment"># mysqladmin -u root password 123456</span><br><br> <span class="hljs-comment"># 配置环境变量HIVE_HOME</span><br>[<span class="hljs-type">root</span>@<span class="hljs-type">localhost</span> ~]<span class="hljs-comment"># vim /root/.bash_profile</span><br><br> <span class="hljs-comment"># 编辑成这样 HIVE_HOME是自定义名字</span><br> export HIVE_HOME=/usr/hive/apache<span class="hljs-literal">-hive-3</span>.<span class="hljs-number">1.2</span><span class="hljs-literal">-bin</span>/<br> <span class="hljs-comment"># 在PATH=$PATH:$HOME后面加 :$HIVE_HOME/bin/</span><br> PATH=<span class="hljs-variable">$PATH:</span><span class="hljs-variable">$HOME</span>/bin:<span class="hljs-variable">$MYSQL_BIN</span>/bin/:<span class="hljs-variable">$HIVE_HOME</span>/bin/<br><br> <span class="hljs-comment"># 生效变量</span><br>[<span class="hljs-type">root</span>@<span class="hljs-type">localhost</span> ~]<span class="hljs-comment"># source /root/.bash_profiles</span><br></code></pre></td></tr></table></figure>
<p><strong>(3) 修改HIVE运行环境, 配置Hadoop安装路径HADOOP_HOME(0/1)分</strong></p>
<p>要安装Hadoop首先配个<a href>jdk8</a></p>
<figure class="highlight powershell"><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></pre></td><td class="code"><pre><code class="hljs PowerShell"> <span class="hljs-comment"># 配置hadoop 首先配jdk8</span><br>[<span class="hljs-type">root</span>@<span class="hljs-type">localhost</span> ~]<span class="hljs-comment"># tar -zxvf jdk-8u301-linux-aarch64.tar.gz</span><br><br> <span class="hljs-comment"># 配置环境变量JAVA_HOME</span><br>[<span class="hljs-type">root</span>@<span class="hljs-type">localhost</span> ~]<span class="hljs-comment"># vim /root/.bash_profile</span><br><br> <span class="hljs-comment"># 编辑成这样 JAVA_HOME是自定义名字</span><br> export JAVA_HOME=/home/sdq/Music/jdk1.<span class="hljs-number">8.0</span>_301/<span class="hljs-number">26</span><span class="hljs-literal">-el7-x86_64</span>/<br> <span class="hljs-comment"># 在PATH=$PATH:$HOME后面加 /bin:$JAVA_HOME/bin/</span><br> PATH=<span class="hljs-variable">$PATH:</span><span class="hljs-variable">$HOME</span>/bin:<span class="hljs-variable">$MYSQL_BIN</span>/bin/:<span class="hljs-variable">$HIVE_HOME</span>/bin/:<span class="hljs-variable">$JAVA_HOME</span>/bin/<br><br> <span class="hljs-comment"># 生效变量</span><br>[<span class="hljs-type">root</span>@<span class="hljs-type">localhost</span> ~]<span class="hljs-comment"># source /root/.bash_profiles</span><br><br> <span class="hljs-comment"># 验证</span><br>[<span class="hljs-type">root</span>@<span class="hljs-type">localhost</span> ~]<span class="hljs-comment"># java</span><br></code></pre></td></tr></table></figure>
<p>然后再安装Hadoop</p>
<figure class="highlight powershell"><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></pre></td><td class="code"><pre><code class="hljs PowerShell"> <span class="hljs-comment"># 安装hadoop</span><br>[<span class="hljs-type">root</span>@<span class="hljs-type">localhost</span> ~]<span class="hljs-comment"># tar -zxvf hadoop-3.3.1.tar.gz</span><br><br> <span class="hljs-comment"># 配置环境变量HADOOP_HOME</span><br>[<span class="hljs-type">root</span>@<span class="hljs-type">localhost</span> ~]<span class="hljs-comment"># vim /root/.bash_profile</span><br><br> <span class="hljs-comment"># 编辑成这样 JAVA_HOME是自定义名字</span><br> export HADOOP_HOME=/home/sdq/Music/hadoop<span class="hljs-literal">-3</span>.<span class="hljs-number">3.1</span>/<br> <span class="hljs-comment"># 在PATH=$PATH:$HOME后面加 /bin:$JAVA_HOME/bin/</span><br> PATH=<span class="hljs-variable">$PATH:</span><span class="hljs-variable">$HOME</span>/bin:<span class="hljs-variable">$MYSQL_BIN</span>/bin/:<span class="hljs-variable">$HIVE_HOME</span>/bin/:<span class="hljs-variable">$JAVA_HOME</span>/bin/:<span class="hljs-variable">$HADOOP_HOME</span>/bin/:<span class="hljs-variable">$HADOOP_HOME</span>/sbin/<br><br> <span class="hljs-comment"># 生效变量</span><br>[<span class="hljs-type">root</span>@<span class="hljs-type">localhost</span> ~]<span class="hljs-comment"># source /root/.bash_profiles</span><br><br> <span class="hljs-comment"># 验证</span><br>[<span class="hljs-type">root</span>@<span class="hljs-type">localhost</span> ~]<span class="hljs-comment"># hadoop</span><br></code></pre></td></tr></table></figure>
<p><strong>(4) 修改HIVE运行环境, 配置Hive配置文件存放路径HIVE_CONF_DIR(0/1)分</strong></p>
<p>重新解压apache-hive-3.1.2-bin.tar.gz最好改个名字再解压</p>
<figure class="highlight powershell"><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></pre></td><td class="code"><pre><code class="hljs PowerShell"> <span class="hljs-comment"># 改名为再解压 或者解压后改名</span><br>[<span class="hljs-type">root</span>@<span class="hljs-type">localhost</span> ~]<span class="hljs-comment"># tar -zxvf apache-hive-3.1.2-bin.tar.gz</span><br> <span class="hljs-comment"># 改名为hive</span><br>[<span class="hljs-type">root</span>@<span class="hljs-type">localhost</span> ~]<span class="hljs-comment"># mv apache-hive-3.1.2-bin/ hive</span><br><br> <span class="hljs-comment"># [二选一] 然后查看一下有没有 没有再自己用vim建 用cp复制一个hive-env.sh.template 取名字为hive-env.sh</span><br> [<span class="hljs-type">root</span>@<span class="hljs-type">localhost</span> ~]<span class="hljs-comment"># cp hive-env.sh.template hive-env.sh</span><br><br> <span class="hljs-comment"># [二选一] 然后cd到conf 改hive-env.sh.template为hive-env.sh</span><br>[<span class="hljs-type">root</span>@<span class="hljs-type">localhost</span> ~]<span class="hljs-comment"># mv hive-env.sh.template hive-env.sh</span><br><br> <span class="hljs-comment"># 配置环境变量HIVE_CONF_DIR</span><br>[<span class="hljs-type">root</span>@<span class="hljs-type">localhost</span> ~]<span class="hljs-comment"># vim hive-env.sh</span><br><br> <span class="hljs-comment"># 配置hive-env.sh文件 编辑 HIVE_CONF_DIR</span><br>[<span class="hljs-type">root</span>@<span class="hljs-type">localhost</span> ~]<span class="hljs-comment"># export HIVE_CONF_DIR=/home/sdq/Music/hive/conf/</span><br></code></pre></td></tr></table></figure>
<p><strong>(5) 修改HIVE运行环境, 配置Hive运行资源库路径HIVE_AUX_JARS_PATH(0/1)分</strong></p>
<figure class="highlight powershell"><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></pre></td><td class="code"><pre><code class="hljs PowerShell"> <span class="hljs-comment"># cd进入conf文件夹</span><br>[<span class="hljs-type">root</span>@<span class="hljs-type">localhost</span> ~]<span class="hljs-comment"># cd /usr/hive/apache-hive-3.1.2-bin/conf/</span><br><br> <span class="hljs-comment"># 找到hive-site.xml进行修改 </span><br>[<span class="hljs-type">root</span>@<span class="hljs-type">localhost</span> ~]<span class="hljs-comment"># vim hive-site.xml</span><br> <span class="hljs-comment"># 里面有 # export HIVE_AUX_JARS_PATH= 把注释解了 然后加上$HIVE_HOME/lib/</span><br>[<span class="hljs-type">root</span>@<span class="hljs-type">localhost</span> ~]<span class="hljs-comment"># export HIVE_AUX_JARS_PATH=$HIVE_HOME/lib/</span><br></code></pre></td></tr></table></figure>
<p><strong>(6) 解决jline的版本冲突, 将$HIVE_HOME/lib/jline-1.12.jar同步至$HOADOOP_HOME/lib下(0/1)分</strong></p>
<figure class="highlight powershell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><code class="hljs PowerShell"> <span class="hljs-comment"># 复制到$HOADOOP_HOME/lib</span><br>[<span class="hljs-type">root</span>@<span class="hljs-type">localhost</span> ~]<span class="hljs-comment"># scp -r $HIVE_HOME/lib/jline-2.12.jar $HOADOOP_HOME/lib/ </span><br></code></pre></td></tr></table></figure>
<h1 id="3-配置HIVE元数据至MySQL-0-6分"><a href="#3-配置HIVE元数据至MySQL-0-6分" class="headerlink" title="3. 配置HIVE元数据至MySQL(0/6分)"></a>3. 配置HIVE元数据至MySQL(0/6分)</h1><p>考核条件如下:<br><strong>(1) 驱动JDBC拷贝至hive安装目录对应lib下 (依赖包存放于/usr/package277/) (0/1)分</strong></p>
<figure class="highlight powershell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><code class="hljs PowerShell"> <span class="hljs-comment"># 因为依赖包不是存放于/usr/package277/ 只需要拷贝到hive安装目录的lib下</span><br>[<span class="hljs-type">root</span>@<span class="hljs-type">localhost</span> ~]<span class="hljs-comment"># scp -r /home/sdq/Music/hive/lib/jline-2.12.jar ./lib/ </span><br></code></pre></td></tr></table></figure>
<p><strong>(2) 配置元数据数据存储位置为/user/hive_remote/warehouse(0/1)分</strong></p>
<figure class="highlight powershell"><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><code class="hljs PowerShell"> <span class="hljs-comment"># 没有该目录就自己mkdir创建一个 -p是递归建立目录</span><br>[<span class="hljs-type">root</span>@<span class="hljs-type">localhost</span> ~]<span class="hljs-comment"># mkdir -p /user/hive_remote/warehouse/</span><br><br> <span class="hljs-comment"># 检查目录</span><br>[<span class="hljs-type">root</span>@<span class="hljs-type">localhost</span> ~]<span class="hljs-comment"># cd /user/hive_remote/warehouse/</span><br></code></pre></td></tr></table></figure>
<p><strong>(3) 配置数据库连接为MySQL(0/1)分</strong></p>
<figure class="highlight powershell"><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><code class="hljs PowerShell"> <span class="hljs-comment"># cd进入conf文件夹</span><br>[<span class="hljs-type">root</span>@<span class="hljs-type">localhost</span> ~]<span class="hljs-comment"># cd /home/sdq/Music/hive/conf</span><br><br> <span class="hljs-comment"># 找到hive-env.sh进行修改 </span><br>[<span class="hljs-type">root</span>@<span class="hljs-type">localhost</span> ~]<span class="hljs-comment"># vim hive-env.sh </span><br><br></code></pre></td></tr></table></figure>
<p><strong>(4) 配置连接JDBC的URL地址主机名及默认端口号3306, 数据库为hive, 如不存在自行创建, ssl连接方式为false(0/1)分</strong></p>
<figure class="highlight powershell"><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><code class="hljs PowerShell"> <span class="hljs-comment"># cd进入conf文件夹</span><br>[<span class="hljs-type">root</span>@<span class="hljs-type">localhost</span> ~]<span class="hljs-comment"># cd /usr/hive/apache-hive-3.1.2-bin/conf/</span><br><br> <span class="hljs-comment"># 找到hive-site.xml进行修改 </span><br>[<span class="hljs-type">root</span>@<span class="hljs-type">localhost</span> ~]<span class="hljs-comment"># vim hive-site.xml</span><br> <property><br> <name>javax.jdo.option.ConnectionURL</name><br> <<span class="hljs-literal">--</span> 配置连接JDBC的URL地址主机名及默认端口号<span class="hljs-number">3306</span> ssl连接方式为false <span class="hljs-literal">--</span>><br> <value>jdbc:mysql://[<span class="hljs-type">IP</span>地址]:<span class="hljs-number">3306</span>/hive?useSSL=false</value><br> </property><br></code></pre></td></tr></table></figure>
<p><strong>(5) 配置数据库连接用户(0/1)分</strong></p>
<figure class="highlight powershell"><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></pre></td><td class="code"><pre><code class="hljs PowerShell"> <span class="hljs-comment"># cd进入conf文件夹</span><br>[<span class="hljs-type">root</span>@<span class="hljs-type">localhost</span> ~]<span class="hljs-comment"># cd /usr/hive/apache-hive-3.1.2-bin/conf/</span><br><br> <span class="hljs-comment"># 找到hive-site.xml进行修改 </span><br>[<span class="hljs-type">root</span>@<span class="hljs-type">localhost</span> ~]<span class="hljs-comment"># vim hive-site.xml</span><br> <property><br> <name>javax.jdo.option.ConnectionUserName</name><br> <value>用户名</value><br> </property><br></code></pre></td></tr></table></figure>
<p><strong>(6) 配置数据库连接密码(0/1)分</strong></p>
<figure class="highlight powershell"><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></pre></td><td class="code"><pre><code class="hljs PowerShell"> <span class="hljs-comment"># cd进入conf文件夹</span><br>[<span class="hljs-type">root</span>@<span class="hljs-type">localhost</span> ~]<span class="hljs-comment"># cd /usr/hive/apache-hive-3.1.2-bin/conf/</span><br><br> <span class="hljs-comment"># 找到hive-site.xml进行修改 </span><br>[<span class="hljs-type">root</span>@<span class="hljs-type">localhost</span> ~]<span class="hljs-comment"># vim hive-site.xml</span><br> <property><br> <name>javax.jdo.option.ConnectionPassword</name><br> <value>密码</value><br> </property><br></code></pre></td></tr></table></figure>
<h1 id="4-配置HIVE客户端-0-3分"><a href="#4-配置HIVE客户端-0-3分" class="headerlink" title="4. 配置HIVE客户端(0/3分)"></a>4. 配置HIVE客户端(0/3分)</h1><p>考核条件如下:<br><strong>(1) 配置元数据存储位置为/user/hive_remote/warehouse(0/1)分</strong></p>
<figure class="highlight powershell"><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><code class="hljs PowerShell"> <span class="hljs-comment"># 没有该目录就自己mkdir创建一个 -p是递归建立目录</span><br>[<span class="hljs-type">root</span>@<span class="hljs-type">localhost</span> ~]<span class="hljs-comment"># mkdir -p /user/hive_remote/warehouse/</span><br><br> <span class="hljs-comment"># 检查目录</span><br>[<span class="hljs-type">root</span>@<span class="hljs-type">localhost</span> ~]<span class="hljs-comment"># cd /user/hive_remote/warehouse/</span><br></code></pre></td></tr></table></figure>
<p><strong>(2) 关闭本地metastore模式(0/1)分</strong></p>
<figure class="highlight powershell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><code class="hljs PowerShell"> <span class="hljs-comment"># </span><br>[<span class="hljs-type">root</span>@<span class="hljs-type">localhost</span> ~]<span class="hljs-comment"># </span><br></code></pre></td></tr></table></figure>
<p><strong>(3) 配置指向metastore服务的主机为slave1, 端口为9083(0/1)分</strong></p>
<figure class="highlight powershell"><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></pre></td><td class="code"><pre><code class="hljs PowerShell"> <span class="hljs-comment"># cd进入conf文件夹</span><br>[<span class="hljs-type">root</span>@<span class="hljs-type">localhost</span> ~]<span class="hljs-comment"># cd /usr/hive/apache-hive-3.1.2-bin/conf/</span><br><br> <span class="hljs-comment"># 找到hive-site.xml进行修改 </span><br>[<span class="hljs-type">root</span>@<span class="hljs-type">localhost</span> ~]<span class="hljs-comment"># vim hive-site.xml</span><br> <property><br> <name>hive.metastore.uris</name><br> <value>thrift://[<span class="hljs-type">IP</span>地址]:<span class="hljs-number">9083</span></value><br> </property><br></code></pre></td></tr></table></figure>
<h1 id="5-启动Hive-0-2分"><a href="#5-启动Hive-0-2分" class="headerlink" title="5. 启动Hive(0/2分)"></a>5. 启动Hive(0/2分)</h1><p>考核条件如下:<br><strong>(1) 服务器端初始化数据库, 启动metastore服务(0/1)分</strong></p>
<figure class="highlight powershell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><code class="hljs PowerShell"> <span class="hljs-comment"># 启动metastore服务并且指定端口</span><br>[<span class="hljs-type">root</span>@<span class="hljs-type">localhost</span> ~]<span class="hljs-comment"># hive --service metastore -p 9083 &</span><br></code></pre></td></tr></table></figure>
<p><strong>(2) 客户端开启进入hive, 创建hive数据库(0/1)分</strong></p>
<figure class="highlight powershell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><code class="hljs PowerShell"> <span class="hljs-comment"># 为root用户设置密码</span><br>[<span class="hljs-type">root</span>@<span class="hljs-type">localhost</span> ~]<span class="hljs-comment"># mysqladmin -u root password 123456 </span><br></code></pre></td></tr></table></figure>
<br>
</article>
</div>
<style>
#wl-edit {