安装CDH-6.2.1和初始化CDH服务所需的MySQL库
一、安装CDH-6.2.1
代码语言:javascript复制yum install cloudera-manager-daemons cloudera-manager-agent cloudera-manager-server
二、初始化CDH服务所需的MySQL库
在MySQL中依次创建监控数据库、Hive数据库、Hue数据库
操作步骤 | 说明 |
---|---|
1 | 启动数据库 |
mysql -uroot -p123456 | |
2 | 初始化CDH在MySQL的数据库 |
create database scm default character set utf8 default collate utf8_general_ci; grant all on scm.* to 'scm'@'%' identified by '123456'; create database amon default character set utf8 default collate utf8_general_ci; grant all on amon.* to 'amon'@'%' identified by '123456'; create database rman default character set utf8 default collate utf8_general_ci; grant all on rman.* to 'rman'@'%' identified by '123456'; create database hue default character set utf8 default collate utf8_general_ci; grant all on hue.* to 'hue'@'%' identified by '123456'; | |
2 | 初始化Hive服务的数据库 |
create database metastore default character set utf8 default collate utf8_general_ci; grant all on metastore.* to 'hive'@'%' identified by '123456'; create database hive default character set utf8 default collate utf8_general_ci; grant all on hive.* to 'hive'@'%' identified by '123456'; grant all on hive.* to 'root'@'%' identified by '123456'; | |
3 | 初始化Sentry服务的数据库 |
create database sentry default character set utf8 default collate utf8_general_ci; grant all on sentry.* to 'sentry'@'%' identified by '123456'; | |
4 | 初始化其他服务的数据库 |
create database nav default character set utf8 default collate utf8_general_ci; grant all on nav.* to 'nav'@'%' identified by '123456'; create database oozie default character set utf8 default collate utf8_general_ci; grant all on oozie.* to 'oozie'@'%' identified by '123456'; flush privileges; |