一、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 ...
随机推荐
- MySQL-业务优化——说的就是变
前言 通过上次发布的业务优化不是一步到位的有不少网友问我许多关于业务优化和Web方面的问题.在这里表示感谢和支持.在期间有些回答不到位的还请谅解,并且个人经验有限. 百牛信息技术bainiu.ltd整 ...
- js中的call和apply方法
call方法: 语法:call(thisObj,[arg1,arg2,arg3,...]); 定义:调用一个对象的一个方法,以另一个对象替换当前对象. 说明: call 方法可以用来代替另一个对象调用 ...
- 安装MySQL需要注意的事项
一.安装MySQL之后,怎样启动MySQL,以及登录.查看数据库操作? 用管理员身份运行cmd或power shell 二.当然有可能会出现不能在cmd或power shell中登录数据库账户 造成这 ...
- 升级Python后, yum不能用了
yum需要使用python2,而升级python3后,就会导致语法错误 更正方法: sudo vim /usr/bin/yum 然后把第一行的python改成python2就好了 之后如果出现类似的, ...
- 51nod1127 最短的包含字符串 尺取法
Bryce1010模板 #include <bits/stdc++.h> using namespace std; typedef long long LL; map<char,LL ...
- 16-6 WEB存储-通讯录实战
<!doctype html> <html> <head> <meta charset="utf-8"> <title> ...
- 设置UITableViewCell 选中时的背景颜色
自定义Cell如图 一个View上面放了四个Label 分别连线到.m文件中 @property (weak, nonatomic) IBOutlet UILabel *nameLabel; @pro ...
- Oracle函数大全下载
Oracle函数大全下载 是一个压缩包,里面是一个chm格式的帮助文档,很实用.
- redis的安装使用以及一些常用的命令
Redis是一个key-value存储系统.并提供多种语言的API,我们可使用它构建高性能,可扩展的Web应用程序.目前越来越多的网站用它来当做缓存,减轻服务器的压力. 本文安装用的到redis是绿色 ...
- 平板&Safari 开发tips
css: *{ margin: 0; padding: 0; /* 禁止用户点选网页内容 */ -webkit-touch-callout:none; -webkit-user-select:non ...