CDH
CDH介绍
Apache Hadoop不足之处
- 版本管理混乱
- 部署过程繁琐、升级过程复杂
- 兼容性差
- 安全性低
CDH介绍
- 基于web的用户界面
- 提供了hadoop的核心
- 快速搭建hadoop集群
- 对集群进行管理
- 方便对hadoop版本升级
- 新版本的hadoop与hive、habase、kafka、spark等兼容
CDH架构图
CDH安装方式
- cloudera manager(推荐)
- yum
- rpm
- tarball
CDH下载地址
- CDH
http://archive.cloudera.com/cdh5/
- cloudera manager
http://archive.cloudera.com/cm5/cm/5/
cloudera manager
- cloudera manager是一个管理CDH的端到端的应用
- 作用
- 管理
- 监控
- 诊断
- 集成
cloudera manager安装
系统环境准备
- 网络配置
- vi /etc/sysconfig/network
-
vi /etc/hosts
-
SSH免密钥登陆
-
ssh-keygen -t dsa -P '' -f ~/.ssh/id_dsa
-
cat ~/.sh/iddsa.pub >>~/.ssh/authorizedkeys
-
防火墙关闭
-
service iptables stop
-
chkconfig iptables off
-
SELINUX关闭
-
vi /etc/selinux/config(SELINUX=disabled)
-
安装JDK配置环境变量
-
export JAVAHOME=/data/jdk1.8.0221
-
export PATH=$PATH:$JAVA_HOME/bin
-
安装NTP
-
yum install ntp -y
-
安装mysql
-
下载第三方依赖包
CM安装
- 安装cloudera manager server、agent
- mkdir -p /opt/cloudera-manager
-
tar xvzf cloudera-manager-centos7-cm5.15.1x8664.tar.gz -C /opt/cloudera-manager
-
创建用户cloudera-scm
-
useradd --system --no-create-home --shell=/bin/false --comment "Cloudera SCM User" cloudera-scm
-
配置CM agent
-
vi /opt/cloudera-manager/cm-5.15.1/etc/cloudera-scm-agent/config.ini
-
server_host=cdh1
-
server_port=7182
-
配置CM server
-
拷贝/usr/share/java/mysql-connector-java.jar
-
grant授权:
-
GRANT ALL PRIVILEGES ON . TO 'scm'@'%' identified by 'scm' WITH GRANT OPTION; flush privileges;
-
/opt/cloudera-manager/cm-5.15.1/share/cmf/schema/scmpreparedatabase.sh mysql -h 172.27.0.2 -uscm -pscm --scm-host VM02centos scm scm scm
-
格式:数据库类型、数据库、数据库服务器、用户名、密码、cm server服务器
-
创建parcel目录
-
Server 节点
-
mkdir -p /opt/cloudera/parcel-repo
-
chown cloudera-scm:cloudera-scm /opt/cloudera/parcel-repo
-
Agent 节点
-
mkdir -p /opt/cloudera/parcels
-
chown cloudera-scm:cloudera-scm /opt/cloudera/parcels
-
制作CDH本地源
-
下载文件存放到/opt/cloudera/parcel-repo
-
CDH-5.15.1-1.cdh5.15.1.p0.4-el7.parcel
-
CDH-5.15.1-1.cdh5.15.1.p0.4-el7.parcel.sha
-
manifest.json
-
启动CM server、agent
-
/opt/cloudera-manager/cm-5.15.1/etc/init.d/cloudera-scm-server start
-
/opt/cloudera-manager/cm-5.15.1/etc/init.d/cloudera-scm-agent start
-
CDH集群安装——页面配置
-
启动完成
-
http://IP:7180/cmf/login
-
默认用户名密码:admin/admin