CDH相当于一个大的容器,将各种组件很好的协调分配组合在一起,去掉了我们烦躁的配置和安装操作。今天把安装步骤记下来,以后用到的时候来看。
1 (修改) 配置文件 vi /etc/selinux/config —> SELINUX=disabled
2 安装JDK 配置环境变量
rpm -ivh
rpm -ivh oracle-j2sdk1.8-1.8.0+update181-1.x86_64.rpm
vi /etc/profile
export JAVA_HOME=/usr/java/jdk1.8.0_181-cloudera/
export CLASSPATH=.:$CLASSPATH:$JAVA_HOME/lib
export PATH=$PATH:$JAVA_HOME/binsource /etc/profile
java -version[root@doitcdh cloudera-repos-6.2.0]# java -version
java version "1.8.0_181"
Java(TM) SE Runtime Environment (build 1.8.0_181-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode)3 创建一个文件夹 存储 mysql驱动包
mkdir -p /usr/share/java
mysql-connector-java.jar
[root@doitcdh java]# pwd
/usr/share/java4 安装mysql 可以使用在线或者离线安装 可参考之前笔记文档
5 开启root用户远程登录权限
mysql> grant all privileges on *.* to 'root'@'%' identified by 'root' with grant option;
mysql> flush privileges;6 创建数据库给后续服务使用
create database cmserver default charset utf8 collate utf8_general_ci;
grant all on cmserver.* to 'root'@'%' identified by 'root';
#给hive
create database metastore default charset utf8 collate utf8_general_ci;
grant all on metastore.* to 'root'@'%' identified by 'root';
# 给CM的activity mornitor
create database amon default charset utf8 collate utf8_general_ci;
grant all on amon.* to 'root'@'%' identified by 'root';
# 给CM的Reports Manager
create database rman default charset utf8 collate utf8_general_ci;
grant all on rman.* to 'root'@'%' identified by 'root';
create database oozie default charset utf8 collate utf8_general_ci;
grant all on oozie.* to 'root'@'%' identified by 'root';
create database hue default charset utf8 collate utf8_general_ci;
grant all on hue.* to 'root'@'%' identified by 'root';7 安装并开启http服务
yum -y install httpd
systemctl start httpd
systemctl enable httpd.service 设置httpd服务开机自启8 配置创建本地仓库
mkdir -p /var/www/html/cloudera-repos/
mv /opt/apps/cloudera-repos-6.2.0 /var/www/html/cloudera-repos/cm6
cd /var/www/html/cloudera-repos/cm6
yum -y install createrepo
createrepo .9 配置yum源
vi /etc/yum.repos.d/cloudera-manager.repo
[clouder-manager]
name=Cloudera Manager,Version
baseurl=http://doitcdh/cloudera-repos/cm6/
gpgcheck=1
enabled=1
yum clean all
yum makecache10 导入 key
rpm --import http://doitcdh/cloudera-repos/cm6/RPM-GPG-KEY-cloudera
11 安装CDH
sudo yum -y install cloudera-manager-daemons
sudo yum -y install cloudera-manager-agent
sudo yum -y install cloudera-manager-server12 追加内容
/opt> mv apps/parcel-6.2.0/* cloudera/parcel-repo/
cd /opt/cloudera/parcel-repo
sha1sum CDH-6.2.0-1.cdh6.2.0.p0.967373-el7.parcel | awk '{ print $1 }' > CDH-6.2.0-1.cdh6.2.0.p0.967373-el7.parcel.sha13 初始化
/opt/cloudera/cm/schema/scm_prepare_database.sh mysql cmserver root root
14 启动服务
systemctl start cloudera-scm-server.service
之后去相应的页面完成配置即可。具体安装细节问题参考笔记。