国产xxxx99真实实拍_久久不雅视频_高清韩国a级特黄毛片_嗯老师别我我受不了了小说

資訊專欄INFORMATION COLUMN

帶大家一起復(fù)習(xí)Hadoop CDH 3節(jié)點(diǎn)集群安裝

IT那活兒 / 2025人閱讀
帶大家一起復(fù)習(xí)Hadoop CDH 3節(jié)點(diǎn)集群安裝
點(diǎn)擊上方“IT那活兒”公眾號(hào),關(guān)注后了解更多內(nèi)容,不管IT什么活兒,干就完了!!!

環(huán)境介紹

主機(jī)名IP角色
MASTER192.168.0.64Hadoop Master,CM Server,Data Node
SLAVE01192.168.0.62Data Node,MySQL,CM Agent
SLAVE02192.168.0.63Data Node,CM Agent

更改三臺(tái)主機(jī) HOSTS 映射文件

[root@SLAVE01 ~]# cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.0.62  SLAVE01
192.168.0.63  SLAVE02
192.168.0.64  MASTER

關(guān)閉系統(tǒng)防火墻,并禁止開(kāi)機(jī)啟動(dòng)

[root@SLAVE01 ~]# service iptables stop
[root@SLAVE01 ~]# chkconfig iptables off

關(guān)閉 selinux,并重啟

[root@SLAVE01 ~]# cat /etc/selinux/config

SELINUX=disabled
SELINUXTYPE=targeted

配置 ntpd 時(shí)間同步服務(wù)

在 MASTER 節(jié)點(diǎn)中的配置文件 /etc/ntp.conf 添加如下內(nèi)容:
server 127.127.1.0
在 SLAVE 節(jié)點(diǎn)中的配置文件添加如下內(nèi)容:
server 192.168.0.64 prefer
MASTER 節(jié)點(diǎn)開(kāi)啟 ntpd 服務(wù):
[root@MASTER ~]# service ntpd start
SLAVE 節(jié)點(diǎn)執(zhí)行如下命令:

[root@SLAVE01 ~]# ntpdate master
 1 Apr 20:54:11 ntpdate[3467]: adjust time server 192.168.0.64 offset -0.000141 sec
 
[root@SLAVE01 ~]# service ntpd start
Starting ntpd: [ OK ]

[root@SLAVE01 ~]# ntpq -p
     remote           refid      st t when poll reach delay offset jitter
==============================================================================
 MASTER LOCAL(0) 6 u 12   64    1    0.823    0.135   0.000

檢查節(jié)點(diǎn)主機(jī)參數(shù)配置

三臺(tái)節(jié)點(diǎn)追加如下參數(shù),并立即生效:

[root@SLAVE01 ~]# vim /etc/sysctl.conf

vm.swappiness = 0

[root@SLAVE01 ~]# sysctl -p

[root@SLAVE01 ~]# echo never > /sys/kernel/mm/redhat_transparent_hugepage/defrag
[root@SLAVE01 ~]# echo echo never > /sys/kernel/mm/redhat_transparent_hugepage/defrag >> /etc/rc.local

確認(rèn) Python 環(huán)境

[root@SLAVE01 ~]# python -V
Python 2.6.6

安裝依賴包

[root@MASTER ~]# rpm -q chkconfig python bind-utils psmisc libxslt zlib sqlite cyrus-sasl-plain cyrus-sasl-gssapi
chkconfig-1.3.49.3-2.el6_4.1.x86_64
python-2.6.6-51.el6.x86_64
bind-utils-9.8.2-0.17.rc1.el6_4.6.x86_64
psmisc-22.6-15.el6_0.1.x86_64
libxslt-1.1.26-2.el6_3.1.x86_64
zlib-1.2.3-29.el6.x86_64
sqlite-3.6.20-1.el6.x86_64
cyrus-sasl-plain-2.1.23-13.el6_3.1.x86_64
cyrus-sasl-gssapi-2.1.23-13.el6_3.1.x86_64

安裝 MySQL 數(shù)據(jù)庫(kù)存儲(chǔ)元數(shù)據(jù)信息

本集群將 MySQL 部署在 SLAVE01 節(jié)點(diǎn)上[_^strong:83925735!]將自帶的 MySQL 數(shù)據(jù)庫(kù)卸載。
[root@SLAVE01 ~]# rpm -qa | grep mysql
mysql-libs-5.1.71-1.el6.x86_64
mysql-5.1.71-1.el6.x86_64
mysql-devel-5.1.71-1.el6.x86_64

[root@SLAVE01 ~]# rpm -e mysql-devel-5.1.71-1.el6.x86_64
[root@SLAVE01 ~]# rpm -e mysql
[root@SLAVE01 ~]# rpm -e --nodeps mysql-libs-5.1.71-1.el6.x86_64
[root@SLAVE01 ~]# rpm -qa | grep mysql
安裝 MySQL:
[root@SLAVE01 ~]# tar -xvf ./MySQL-5.6.27-1.el6.x86_64.rpm-bundle.tar
[root@SLAVE01 ~]# rpm -ivh MySQL-*.rpm
以下是 MySQL root 用戶的初始密碼:
[root@SLAVE01 ~]# cat /root/.mysql_secret
# The random password set for the root user at Sun Apr 1 21:22:17 2018 (local time): KYFVIGg8KErbhsCE
啟動(dòng) MySQL:
[root@SLAVE01 ~]# /usr/bin/mysqld_safe &
更改 MySQL root 用戶的密碼:
[root@SLAVE01 ~]# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 1
Server version: 5.6.27

Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type help; or h for help. Type c to clear the current input statement.

mysql> SET PASSWORD FOR root@localhost = PASSWORD(123456);
Query OK, 0 rows affected (0.00 sec)
創(chuàng)建需要用到的數(shù)據(jù)庫(kù):
mysql> create database scm;
Query OK, 1 row affected (0.00 sec)

mysql>
 create database hive;
Query OK, 1 row affected (0.00 sec)

mysql>
 create database rm;
Query OK, 1 row affected (0.00 sec)

mysql>
 create database oozie;
Query OK, 1 row affected (0.00 sec)
創(chuàng)建集群用戶,并賦予相關(guān)權(quán)限。

mysql> CREATE USER cdh@% IDENTIFIED BY 123456;
Query OK, 0 rows affected (0.00 sec)

mysql>
 GRANT ALL ON *.* TO cdh@%;
Query OK, 0 rows affected (0.00 sec)

在每臺(tái)節(jié)點(diǎn)中創(chuàng)建所需要的系統(tǒng)用戶

[root@SLAVE01 ~]# useradd --system --home=/opt/cloudera-manager/cm-5.5.0/run/cloudera-scm-server --no-create-home --shell=/bin/false --comment "Cloudera SCM User" cloudera-scm

在每臺(tái)節(jié)點(diǎn)中創(chuàng)建服務(wù)器所需目錄,并授權(quán)

mkdir /opt/cloudera-manager
mkdir -p /opt/cloudera/parcel-repo
mkdir -p /opt/cloudera/parcels
mkdir -p /var/log/cloudera-scm-headlamp
mkdir -p /var/log/cloudera-scm-firehose
mkdir -p /var/log/cloudera-scm-alertpublisher
mkdir -p /var/log/cloudera-scm-eventserver
mkdir -p /var/lib/cloudera-scm-headlamp
mkdir -p /var/lib/cloudera-scm-firehose
mkdir -p /var/lib/cloudera-scm-alertpublisher
mkdir -p /var/lib/cloudera-scm-eventserver
mkdir -p /var/lib/cloudera-scm-server

chown cloudera-scm:cloudera-scm /opt/cloudera-manager
chown -R cloudera-scm:cloudera-scm /var/log/cloudera-*
chown -R cloudera-scm:cloudera-scm /var/lib/cloudera-*
chown cloudera-scm:cloudera-scm /opt/cloudera/parcel-repo
chown cloudera-scm:cloudera-scm /opt/cloudera/parcels

在每臺(tái)節(jié)點(diǎn)中安裝 Cloudera Manager

[root@SLAVE01 ~]# tar -xzf cloudera-manager-el6-cm5.5.0_x86_64.tar.gz -C /opt/cloudera-manager
[root@SLAVE01 ~]# chown cloudera-scm:cloudera-scm /opt/cloudera-manager
將 MySQL JDBC 驅(qū)動(dòng)拷貝至對(duì)應(yīng)目錄中:

[root@SLAVE01 ~]# mkdir -p /usr/share/java
[root@SLAVE01 ~]# cp mysql-connector-java-5.1.38.jar /usr/share/java/
[root@SLAVE01 ~]# mkdir -p /usr/lib/hive/lib/
[root@SLAVE01 ~]# cp mysql-connector-java-5.1.38.jar /usr/lib/hive/lib/

在每臺(tái)節(jié)點(diǎn)中安裝 JDK

[root@SLAVE01 ~]# rpm -ivh jdk-7u80-linux-x64.rpm
在 /etc/profile 中配置 java 環(huán)境變量,并立即生效。
[root@SLAVE01 ~]# vim /etc/profile

export JAVA_HOME=/usr/java/default
export CLASS_PATH=./:$JAVA_HOME/lib
export PATH=$JAVA_HOME/bin:$PATH

[root@SLAVE01 ~]# source /etc/profile
檢查 jdk 是否安裝成功。

[root@SLAVE01 ~]# java -version
java version "1.7.0_80"
Java(TM) SE Runtime Environment (build 1.7.0_80-b15)
Java HotSpot(TM) 64-Bit Server VM (build 24.80-b11, mixed mode)

在 MASTER 節(jié)點(diǎn)初始化 CM 的配置數(shù)據(jù)庫(kù)

[root@MASTER ~]# cd /opt/cloudera-manager/cm-5.5.0/share/cmf/schema/
[root@MASTER schema]# ./scm_prepare_database.sh -h SLAVE01 -P 3306 mysql scm cdh 123456

在每臺(tái) SLAVE 節(jié)點(diǎn)配置 Cloudera Manager Agent

[root@SLAVE01 ~]# cd /opt/cloudera-manager/cm-5.5.0/etc/cloudera-scm-agent/
[root@SLAVE01 cloudera-scm-agent]# vim config.ini
修改為對(duì)應(yīng)的 CM Server 所在的節(jié)點(diǎn):

server_host=MASTER

在 CM Server 節(jié)點(diǎn)中將 Parcel 文件移動(dòng)至指定目錄

[root@MASTER ~]# mv CDH-5.5.0-1.cdh5.5.0.p0.8-el6.parcel /opt/cloudera/parcel-repo/
[root@MASTER ~]# mv manifest.json /opt/cloudera/parcel-repo/
[root@MASTER ~]# mv CDH-5.5.0-1.cdh5.5.0.p0.8-el6.parcel.sha1 /opt/cloudera/parcel-repo/CDH-5.5.0-1.cdh5.5.0.p0.8-el6.parcel.sha

啟動(dòng) CM Server 和 CM Agent

啟動(dòng) CM Server:
[root@MASTER ~]# /opt/cloudera-manager/cm-5.5.0/etc/init.d/cloudera-scm-server start
Starting cloudera-scm-server: [ OK ]
啟動(dòng) CM Agent:
[root@MASTER ~]# /opt/cloudera-manager/cm-5.5.0/etc/init.d/cloudera-scm-agent start
Starting cloudera-scm-agent:                               [ OK ]

[root@SLAVE01 cloudera-scm-agent]# /opt/cloudera-manager/cm-5.5.0/etc/init.d/cloudera-scm-agent start
Starting cloudera-scm-agent:                               [ OK ]

[root@SLAVE02 ~]# /opt/cloudera-manager/cm-5.5.0/etc/init.d/cloudera-scm-agent start
Starting cloudera-scm-agent:                               [ OK ]

登錄 CM 管理界面

http://master:7180/cmf/home 

默認(rèn)用戶名密碼 admin/admin

版本可選擇 Cloudera Enterprise Data Hub Edition Trial ,試用期60天過(guò)后,自動(dòng)降為 Express 版本。
在當(dāng)前管理的主機(jī)界面中,可以看到三個(gè)節(jié)點(diǎn) MASTER、SLAVE01、SLAVE02。
在組件安裝選擇界面,選擇 含Impala的內(nèi)核即可。
組件規(guī)劃上,由于是測(cè)試環(huán)境,因此 DataNode 選擇所有主機(jī)。
數(shù)據(jù)庫(kù)安裝界面,規(guī)劃如下:
SLAVE01  DB Name:hive  Username:cdh  Password:123456
SLAVE01  DB Name:rm  Username:cdh  Password:123456
SLAVE01  DB Name:oozie  Username:cdh  Password:123456

遇到的問(wèn)題

集群搭建結(jié)束之后,出現(xiàn)了 Network Interface Speed 問(wèn)題,應(yīng)該是網(wǎng)絡(luò)接口速度導(dǎo)致的,修改了相關(guān)配置之后,避免了該問(wèn)題。
Change Hosts Network Interfaces Slow Link Modes Thresholds for all hosts.
將其修改為 Nerver 即可。

關(guān)閉集群

[root@MASTER ~]# /opt/cloudera-manager/cm-5.5.0/etc/init.d/cloudera-scm-agent stop
Stopping cloudera-scm-agent:                               [ OK ]
[root@MASTER ~]# /opt/cloudera-manager/cm-5.5.0/etc/init.d/cloudera-scm-server stop
Stopping cloudera-scm-server: [ OK ]

[root@SLAVE01 ~]# /opt/cloudera-manager/cm-5.5.0/etc/init.d/cloudera-scm-agent stop
Stopping cloudera-scm-agent:                               [ OK ]

[root@SLAVE02 ~]# /opt/cloudera-manager/cm-5.5.0/etc/init.d/cloudera-scm-agent stop
Stopping cloudera-scm-agent:                               [ OK ]


本文作者:郝昊喆(上海新炬王翦團(tuán)隊(duì))

本文來(lái)源:“IT那活兒”公眾號(hào)

文章版權(quán)歸作者所有,未經(jīng)允許請(qǐng)勿轉(zhuǎn)載,若此文章存在違規(guī)行為,您可以聯(lián)系管理員刪除。

轉(zhuǎn)載請(qǐng)注明本文地址:http://specialneedsforspecialkids.com/yun/129241.html

相關(guān)文章

  • docker安裝cdh

      Docker是一個(gè)開(kāi)源容器引擎,可以輕松地在任何地方打包,運(yùn)行和分發(fā)應(yīng)用程序.  在Docker上安裝CDH有以下幾個(gè)步驟:  安裝Docker: 在你的操作系統(tǒng)上安裝Docker。如果你還沒(méi)有安裝Docker,請(qǐng)參考Docker官方文檔來(lái)安裝Docker。  下載CDH鏡像: 使用以下命令下載CDH鏡像:  Copy codedocker pull cloudera/quickstart:l...

    白馬嘯西風(fēng) 評(píng)論0 收藏0

發(fā)表評(píng)論

0條評(píng)論

最新活動(dòng)
閱讀需要支付1元查看
<