大數(shù)據(jù)技術(shù)之CM安裝------2(含大數(shù)據(jù)學(xué)習(xí)教程)

大數(shù)據(jù)學(xué)習(xí)資料領(lǐng)取地址(免費(fèi))無套路

第2章 環(huán)境要求

1.1 內(nèi)存分配

將3臺(tái)虛擬機(jī)分配好內(nèi)存 建議8G、4G、4G

1.2 本次安裝需要的jar包

#注意:必須是Oracle JDK、不要使用OpenJDK

1.jdk-8u144-linux-x64.tar.gz

2.CDH-5.12.1-1.cdh5.12.1.p0.3-el7.parcel

3.CDH-5.12.1-1.cdh5.12.1.p0.3-el7.parcel.sha

4.cloudera-manager-centos7-cm5.12.1_x86_64.tar.gz

5.manifest.json

6.mysql5.7

1.3 更改Yum源

在三臺(tái)節(jié)點(diǎn)(所有agent的節(jié)點(diǎn))上執(zhí)行下載第三方依賴

更改為阿里yum源

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

yum clean all

yum makecache

1.4 安裝JDK

#建議放在在這個(gè)目錄下

tar -zxvf ?jdk-8u144-linux-x64.tar.gz -C /usr/java/

#有時(shí)候會(huì)有權(quán)限問題的坑

chown -R root:root /usr/java/

1.5 安裝配置mysql

此處略,看之前的文檔及視頻

注意點(diǎn):此處用的是5.7的版本,遠(yuǎn)程使用時(shí),記得更改給root改為"%"權(quán)限

(1)集群監(jiān)控?cái)?shù)據(jù)庫

create database amon DEFAULT CHARSET utf8 COLLATE utf8_general_ci;

grant all on amon.* TO 'amon'@'%' IDENTIFIED BY 'amon';

(2)hive數(shù)據(jù)庫

create database hive DEFAULT CHARSET utf8 COLLATE utf8_general_ci;

grant all on hive.* TO 'hive'@'%' IDENTIFIED BY 'hive';

(3)oozie數(shù)據(jù)庫

create database oozie DEFAULT CHARSET utf8 COLLATE utf8_general_ci;

grant all on oozie.* TO 'oozie'@'%' IDENTIFIED BY 'oozie';

(4)hue數(shù)據(jù)庫

create database hue DEFAULT CHARSET utf8 COLLATE utf8_general_ci;

grant all on oozie.* TO 'hue'@'%' IDENTIFIED BY 'hue';

1.6 關(guān)閉SELINUX和防火墻

臨時(shí)關(guān)閉:

setenforce 0

修改配置文件/etc/selinux/config(重啟生效)

#將SELINUX=enforcing 改為 SELINUX=disabled

#關(guān)閉防火墻

systemctl stop firewalld

#禁用防火墻

systemctl disable firewalld

#查看防火墻是否關(guān)閉

systemctl status firewalld

1.7 hosts映射

vi /etc/hosts

192.168.1.111 bigdata111

192.168.1.112 bigdata112

192.168.1.113 bigdata113

:企業(yè)中不設(shè)置免密

1.8 下載第三方依賴

在三臺(tái)節(jié)點(diǎn)(所有agent的節(jié)點(diǎn))上執(zhí)行下載第三方依賴

yum -y install chkconfig python bind-utils psmisc libxslt zlib sqlite cyrus-sasl-plain cyrus-sasl-gssapi fuse fuse-libs redhat-lsb

1.9 ssh免密登錄

#生成公鑰

ssh-keygen -t esa

#拷貝公鑰到其他節(jié)點(diǎn)(九遍)

ssh-copy-id bigdata111

ssh-copy-id bigdata112

ssh-copy-id bigdata113

1.10 NTP時(shí)間和時(shí)鐘同步服務(wù)(可略過)

#查看時(shí)間幫助

timedatectl --help

#設(shè)置為上海的時(shí)區(qū)

timedatectl set-timezone Asia/Shanghai

#生產(chǎn)環(huán)境中一般會(huì)手動(dòng)安裝NTP服務(wù)(自己練習(xí)一下步驟可以省略)

yum -y install ntp

vi ?/etc/ntp.conf

添加如下

#time ?前四行是使用網(wǎng)絡(luò)時(shí)間

server 0.asia.pool.ntp.org

server 1.asia.pool.ntp.org

server 2.asia.pool.ntp.org

server 3.asia.pool.ntp.org

#生產(chǎn)中不能使用聯(lián)網(wǎng)的話, 使用本地時(shí)間

server 192.168.1.0 iburst local clock

#可以讓192.168.1網(wǎng)段下所有IP都可以同步

restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap

#啟動(dòng)ntpd (僅在主節(jié)點(diǎn))

systemctl start ntpd

#查看ntpd的狀態(tài)

systemctl status ntpd

#關(guān)閉從節(jié)點(diǎn)時(shí)間同步

systemctl stop ntpd

systemctl disable ntpd

#查詢ntpdate

which ntpdate

#讓所有從節(jié)點(diǎn)與主節(jié)點(diǎn)同步 \ 注:集群中會(huì)每幾個(gè)小時(shí)同步一次,保證時(shí)間一致

/usr/sbin/ntpdate bigdata111

#列出所有的時(shí)區(qū)

timedatectl list-timezones

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容