CDH对应各种大数据组件版本参考:https://www.cloudera.com/documentation/enterprise/release-notes/topics/cdh_vd_cdh_package_tarball_516.html
CloderaManage架构
安装centos7,关闭防火墙
1.关闭SELinux:
vi /etc/selinux/config ,修改如下:
SELINUX=disabled
2. 关闭防火墙:
sudo service iptables stop
sudo chkconfig iptables off
sudo chkconfig iptables --list
停止firewall
systemctl stop firewalld.service
禁止firewall开机启动
systemctl disable firewalld.service
免密登录
1.生成密钥:三台机器都执行
ssh-keygen -t rsa(默认位于 ~/.ssh/)直接回车就可以了
2. 拷贝公钥到所有机器:三台机器都执行
ssh-copy-id root@master
ssh-copy-id root@slave01
ssh-copy-id root@slave02
3.测试免密登录:
ssh master
ssh slave01
ssh slave02
更改主机名 hostname maste
然后 su
设置ntp时间同步服务:两台从机与主机时间同步
安装linux中安装yum简单方法:https://www.jianshu.com/p/c02d0bcd5a82 安装包已下载
1.安装 ntp
yum –y install ntp
2.设置NTP服务开机启动
chkconfig ntpd on
将master设置为主服务器(在master节点操作):
1. vi /etc/ntp.conf,内容如下:
driftfile /var/lib/ntp/ntp.drift #草稿文件
# 允许内网其他机器同步时间
restrict 192.168.137.0 mask 255.255.255.0 nomodify notrap
# Use public servers from the pool.ntp.org project.
# 中国这边最活跃的时间服务器 : [http://www.pool.ntp.org/zone/cn](http://www.pool.ntp.org/zone/cn)
server 210.72.145.44 perfer # 中国国家受时中心
server 202.112.10.36 # 1.cn.pool.ntp.org
server 59.124.196.83 # 0.asia.pool.ntp.org
# allow update time by the upper server
# 允许上层时间服务器主动修改本机时间
restrict 210.72.145.44 nomodify notrap noquery
restrict 202.112.10.36 nomodify notrap noquery
restrict 59.124.196.83 nomodify notrap noquery
# 外部时间服务器不可用时,以本地时间作为时间服务
server 127.127.1.0 # local clock
fudge 127.127.1.0 stratum 10
2. 重启服务: service ntpd restart
3. 查看同步状态: netstat -tlunp | grep ntp
设置slave到master 的同步(在slave节点操作):
1. vi /etc/ntp.conf,内容如下:
driftfile /var/lib/ntp/ntp.drift # 草稿文件
statsdir /var/log/ntpstats/
statistics loopstats peerstats clockstats
filegen loopstats file loopstats type day enable
filegen peerstats file peerstats type day enable
filegen clockstats file clockstats type day enable
# 让NTP Server为内网的ntp服务器
server 192.168.137.110
fudge 192.168.137.110 stratum 5
# 不允许来自公网上ipv4和ipv6客户端的访问
restrict -4 default kod notrap nomodify nopeer noquery
restrict -6 default kod notrap nomodify nopeer noquery
# Local users may interrogate the ntp server more closely.
restrict 127.0.0.1
restrict ::1
2. 重启服务: service ntpd restart
3. 手动同步: ntpdate -u 192.168.137.110
创建software文件夹,存放jdk&cm
安装参考:https://www.jianshu.com/p/f25b81772142 下载的CD和相关文件
CDH安装包地址:http://archive.cloudera.com/cdh5/parcels/latest/
下载文件位置
Clouder Manager相关文件 |
下载bin文件
http://archive.cloudera.com/cm5/installer/5.16.2/
http://archive.cloudera.com/cm5/redhat/6/x86_64/cm/
日志保存目录:/var/log/cloudera-scm-server
修改hdfs副本数:
查看每台运行情况:service cloudera-scm-agent status
cdh:关闭与启动
CM Portal 地址:
http://master:7180/cmf/home
关闭步骤:
在CM portal上关闭 cluster
在所有节点关闭CM agent: service cloudera-scm-agent stop
在master节点关闭CM server: service cloudera-scm-server stop
启动步骤:
在所有节点启动CM agent: service cloudera-scm-agent start
在master节点启动CM server: service cloudera-scm-server start
在CM portal上启动 cluster
查看启动日志:
/var/log/cloudera-scm-server/cloudera-scm-server.log