CDH搭建

架构

架构

ClouderaManager安装

步骤1

1
useradd --system --no-create-home --shell=/bin/false --comment "Cloudera SCM User" cloudera-scm

步骤2

1
2
3
4
5
6
7
8
9
mysql>use mysql;
mysql>desc user;
mysql>GRANT ALL PRIVILEGES ON *.* TO root@"%" IDENTIFIED BY "hadoop";  //为root添加远程连接的能力。
mysql>update user set Password = password('root') where User='root';
mysql>select Host,User,Password  from user where User='root';
mysql>flush privileges;
mysql>exit

./scm_prepare_database.sh mysql scm -hc00 -uroot -proot --scm-host c00 scm scm scm

步骤3

1
2
3
4
5
cd /opt/cloudera-manager/cm-5.13.0/etc/init.d/
# 启动server
./cloudera-scm-server start
# 启动agent
./cloudera-scm-agent start

CDDH部署

建库脚本

1
2
3
4
5
6
7
8
9
10
11
// amon
create database amon DEFAULT CHARACTER SET utf8;
// hive
create database hive DEFAULT CHARACTER SET utf8;
grant all on hive.*TO 'hive'@'%' IDENTIFIED BY 'hive';
// oozie
create database oozie DEFAULT CHARACTER SET utf8;
grant all on oozie.* TO 'oozie'@'%' IDENTIFIED BY 'oozie';
// hue
create database hue DEFAULT CHARACTER SET utf8;
grant all on hue.* TO 'hue'@'%' IDENTIFIED BY 'hue';