一、CDH下载:
cloudera-manager-installer.bin:http://archive.cloudera.com/cm5/installer/latest/,非生产环境安装才需要
RPM: http://archive.cloudera.com/cm5/redhat/7/x86_64/cm/5.12/RPMS/x86_64/,保存至/usr/CDH/rpm
二、安装cloudera manager:
1.关闭防火墙:
1.1关闭SELinux:vi /etc/selinux/config,修改SELinux=disabled,重启生效,查看 /usr/sbin/sestatus -v
1.2关闭iptables:
1.2.1 禁止iptables:service iptables stop && chkconfig iptables off
1.2.2 清除iptables: iptables -F
1.3关闭防火墙
systemctl disable firewalld
systemctl stop firewalld
2.建立各节点无密码SSH
2.1 ssh-keygen
2.2 cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
3.安装rpm,cd /usr/CDH/rpm
3.1 如果之前有安装刚先卸载:
3.1.1 卸载manager:yum -y remove cloudera-manager-daemons cloudera-manager-server
3.1.2 卸载agent:yum -y remove cloudera-manager-daemons cloudera-manager-agent
3.2 cp cloudera-manager.repo /etc/yum.repos.d/
3.3 manager server:yum -y install oracle-j2sdk1.7-1.7.0+update67-1.x86_64.rpm
cloudera-manager-daemons-5.12.0-1.cm5120.p0.120.el7.x86_64.rpm
cloudera-manager-server-5.12.0-1.cm5120.p0.120.el7.x86_64.rpm
3.4 manager agent:yum -y install oracle-j2sdk1.7-1.7.0+update67-1.x86_64.rpm
cloudera-manager-daemons-5.12.0-1.cm5120.p0.120.el7.x86_64.rpm
cloudera-manager-agent-5.12.0-1.cm5120.p0.120.el7.x86_64.rpm
3.5 cp /usr/CDH/mysql-connector-java-5.1.38.jar /usr/share/cmf/common_jars
4.建立mysq驱动软连接:cd /usr/share/cmf/lib && ln -s ../common_jars/mysql-connector-java-5.1.15.jar mysql-connector-java-5.1.15.jar
5.Install the JDBC driver on the Cloudera Manager Server host, as well as hosts to which you assign the Activity Monitor, Reports Manager,
Hive Metastore Server, Hue Server, Sentry Server, Cloudera Navigator Audit Server, and Cloudera Navigator Metadata Server roles:
mkdir -p /usr/share/java/ && ln -s /usr/share/cmf/common_jars/mysql-connector-java-5.1.15.jar /usr/share/java/mysql-connector-java.jar
6.运行目录:
6.1 java安装目录: /usr/java/jdk1.7.0_67-cloudera
6.2 cm server数据库配置:/etc/cloudera-scm-server/db.properties
com.cloudera.cmf.db.type=mysql
com.cloudera.cmf.db.host=mysql
com.cloudera.cmf.db.name=scm
com.cloudera.cmf.db.user=scm
com.cloudera.cmf.db.setupType=EXTERNAL
com.cloudera.cmf.db.password=scm
6.3 cm agent代理配置目录: /etc/cloudera-scm-agent,修改config.ini中server_host为cm server主机名或地址
6.4 cm jar包目录: /usr/share/cmf/lib
6.5 cm server启动日志目录: /var/log/cloudera-scm-server
6.6 cm agent启动日志目录: /var/log/cloudera-scm-agent
7.升级mysql驱动:
7.1 将mysql-connector-java-5.1.38.jar上传至所有主机/usr/share/cmf/common_jars目录
7.2 将老版本驱动更名:mv /usr/share/cmf/common_jars/mysql-connector-java-5.1.15.jar /usr/share/cmf/common_jars/mysql-connector-java-5.1.15-old.jar
7.3 将新驱动更名: mv /usr/share/cmf/common_jars/mysql-connector-java-5.1.38.jar /usr/share/cmf/common_jars/mysql-connector-java-5.1.15.jar
三、cloudera数据库初始化:
1.managent service数据库
1.1 mysql命令行下执行:grant all on *.* to 'scm'@'%' identified by 'scm' with grant option;
1.2 bash下执行:/usr/share/cmf/schema/scm_prepare_database.sh mysql -h mysql -uroot -p123 --scm-host manager scm scm scm
1.3 mysql命令行下执行:drop user 'scm'@'%';
以下在mysql命令行下执行:
2.Activity Monitor:
create database if not exists `cdh_amon` default character set utf8 collate utf8_general_ci;
create user amon@'%' identified by 'amon';
grant all privileges on cdh_amon .* to amon @'%' identified by 'amon';
3.Reports Manager:
create database if not exists `cdh_rman` default character set utf8 collate utf8_general_ci;
create user rman@'%' identified by 'rman';
grant all privileges on cdh_rman.* to rman@'%' identified by 'rman';
4.Hive Metastore Server:
create database if not exists `cdh_hive` default character set utf8 collate utf8_general_ci;
create user hive@'%' identified by 'hive';
grant all privileges on cdh_hive.* to hive@'%' identified by 'hive';
5.Sentry Server:
create database if not exists `cdh_sentry` default character set utf8 collate utf8_general_ci;
create user sentry@'%' identified by 'sentry';
grant all privileges on cdh_sentry.* to sentry@'%' identified by 'sentry';
6.Cloudera Navigator Audit Server:
create database if not exists `cdh_nav` default character set utf8 collate utf8_general_ci;
create user nav@'%' identified by 'nav';
grant all privileges on cdh_nav.* to nav@'%' identified by 'nav';
7.Cloudera Navigator Metadata Server:
create database if not exists `cdh_navms` default character set utf8 collate utf8_general_ci;
create user navms@'%' identified by 'navms';
grant all privileges on cdh_navms.* to navms@'%' identified by 'navms';
8.Hue:
create database if not exists `cdh_hue` default character set utf8 collate utf8_general_ci;
create user hue@'%' identified by 'hue';
grant all privileges on cdh_hue.* to hue@'%' identified by 'hue';
9.Oozie:
create database if not exists `cdh_oozie` default character set utf8 collate utf8_general_ci;
create user oozie@'%' identified by 'oozie';
grant all privileges on cdh_oozie.* to oozie@'%' identified by 'oozie';
四、启动主节点:service cloudera-scm-server start,在/run/cloudera-scm-server.pid里保存进程ID
五、启动代理节点:service cloudera-scm-agent start,浏览器输入http://CM Server IP:7180
六、各种坑:
1.代理节点启动报错:
错误信息:Error, CM server guid updated, expected df16790a-2e44-44ec-9db2-8731cc635c61, received b6fecabc-8e32-46be-8a43-5f261064b2c7
解决方法:删除/var/lib/cloudera-scm-agent下cm_guid文件
2.oozie缺少ext-2.2:
解决方法:将ext-2.2拷贝至/var/lib/oozie目录
3.spark运行报错:Required executor memory (1024+384 MB) is above the max threshold (1024 MB) of this cluster!
Please check the values of 'yarn.scheduler.maximum-allocation-mb' and/or 'yarn.nodemanager.resource.memory-mb'
解决方法:修改服务YARN (MR2 Included)中如下配置项并保存,重启YARN:
最小容器内存(大于1G):yarn.scheduler.minimum-allocation-mb
最大容器内存(大于1G):yarn.scheduler.maximum-allocation-mb
容器内存(大于1G):yarn.nodemanager.resource.memory-mb
4.linux shell运行hdfs及运行spark时报错:org.apache.hadoop.security.AccessControlException: Permission denied: user=root, access=WRITE, inode="/user":hdfs:supergroup:drwxr-xr-x
解决方法:将export HADOOP_USER_NAME=hdfs添加到~/.bash_profile或/etc/profile中,然后source ~/.bash_profile或source /etc/profile
5.hive执行引擎默认为mapreduce的配置修改:hive.execution.engine由mr改为spark
6.agent节点无法通过http从manager下载安装文件,取消原来安装的JDK8版本,换成cloudera指定的jdk安装包则OK,分析可能是JDK8某些安全方面的控制造成
7.agent节点无法通过http从manager下载CDH-5.12.0-1.cdh5.12.0.p0.29-el7.parcel.torrent文件,造成安装页面停止
原因:manager节点下/opt/cloudera/parcel-repo/所有文件是通过另一环境COPY而来,torrent文件所有者为root,造成cm无法访问
解决:删除CDH-5.12.0-1.cdh5.12.0.p0.29-el7.parcel.torrent文件,由cm自行从cloudera官网下载此文件
8.agent节点启动后无法生成主机ID,造成CM不能识别该主机
原因:发现该节点下/var/lib/cloudera-scm-agent目录uuid文件大小为0k,未生成此主机ID
解决:删除此uuid文件,输入命令service cloudera-scm-agent restart重新启动agent
- [CDH] Cloudera's Distribution including Apache Hadoop
You may choose to install spark, yarn, hive, etc one by one. [Spark] 00 - Install Hadoop & Spark ...
- CM5(Cloudera Manager 5) + CDH5(Cloudera's Distribution Including Apache Hadoop 5)的安装详细文档
参考 :http://www.aboutyun.com/thread-9219-1-1.html Cloudera Manager5及CDH5在线(cloudera-manager-installer ...
- Cloudera公司主要提供Apache Hadoop开发工程师认证
Cloudera Cloudera公司主要提供Apache Hadoop开发工程师认证(Cloudera CertifiedDeveloper for Apache Hadoop ,CCDH)和Apa ...
- 转: CentOS上安装LAMP之第一步:Apache环境及安装过程报错解决方案(纯净系统环境)
传送门:http://blog.csdn.net/zhangatle/article/details/77416996 小心坑!填完就懂怎么安装了 Note:要从零开始搭建,就不要嫌中间遇到各种问题 ...
- hadoop分布式安装过程
一.安装准备及环境说明 1.下载hadoop-1.2.1,地址:http://apache.spinellicreations.com/hadoop/common/stable/hadoop-1.2. ...
- centos apache源码安装过程记录
1.下载相关源文件 wget http://mirror.bjtu.edu.cn/apache/httpd/httpd-2.4.18.tar.gzwget http://mirrors.hust.ed ...
- 安装部署Apache Hadoop (本地模式和伪分布式)
本节内容: Hadoop版本 安装部署Hadoop 一.Hadoop版本 1. Hadoop版本种类 目前Hadoop发行版非常多,有华为发行版.Intel发行版.Cloudera发行版(CDH)等, ...
- CDH安装
离线安装Cloudera Manager 5和CDH5(最新版5.1.3) 完全教程 关于CDH和Cloudera Manager CDH (Cloudera's Distribution, incl ...
- CM+CDH安装教程(CentOS)
一.简单介绍 CM:Cloudera Manager,Cloudera公司编写的一个CDH的管理后台,类似各CMS的管理后台. CDH:Cloudera’s distribution,includin ...
随机推荐
- DOS命令汇总
汇总如下: Dos基础命令梳理思路 小编初来乍道, 不清楚我的插图在我发布后会不会不清晰, 因为我在排版时看到插入的图片是清晰的, 以前见其他条友发布的文章中总有不晰的图片, 很是不爽. 所以如果有不 ...
- bzoj3995
线段树 额 计蒜客竟然把这个出成noip模拟题... 这个东西很像1018,只不过维护的东西不太一样 然后我参考了fuxey大神的代码,盗一波图 具体有这五种情况,合并请看代码,自己写了一个结果wa了 ...
- ChartCtrl源码剖析之——CChartAxisLabel类
CChartAxisLabel类用来绘制轴标签,上.下.左.右都可以根据实际需要设置对应的轴标签.它处于该控件的区域,如下图所示: CChartAxisLabel类的头文件. #if !defined ...
- 01_传智播客iOS视频教程_课程介绍与知识点回顾
OC语法中static关键字不能修饰属性,也不能修饰方法,只能修饰方法中的局部变量.static修饰局部变量之后把局部变量变成静态变量.当方法执行完之后这个变量不会被回收.下次再执行这个方法的时候这个 ...
- wireshark笔记(1)之工具认识
1 下载链接 https://www.wireshark.org/ 安装只需要注意同时会安装winpcap就好了 相关链接:www.wiresharkbook.com //书籍 英文 www.wik ...
- idea 快捷键以及包含字符串文件搜索
1.idea也有一个类似于eclipse的包含字符串文件搜索(特别实用) idea 里按快捷键:ctrl+H 2.下图是idea的快捷键汇总 3.debug调试 F5:跳入方法 F6:向下逐行调试 ...
- poj 1815 Friendship【最小割】
网络流的题总是出各种奇怪的错啊--没写过邻接表版的dinic,然后bfs扫到t点不直接return 1就会TTTTTLE-- 题目中的操作是"去掉人",很容易想到拆点,套路一般是( ...
- APP支付宝登录第三方授权如何签约入口在哪里
最近,公司项目要接入支付宝授权登录,第三方SDK接入过不少,一顿按照流程操作.到签约的步骤的时候就把我难住了,入口一直找不到.然后在文档中心搜索“支付宝登录签约”,找到一个申请地址.心想终于找到你了, ...
- win7 右键菜单残影 消除方法
1. 治标法: 右键桌面->更改分辨率 随便换一个分辨率再还原就OK了! 2. 根治法: 我的电脑-> 属性 ->高级选项-> 高级-> 设置-> 自定义 不 ...
- 3、InputStream
package com.io.file; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoun ...