https://www.cloudera.com/documentation/manager/5-0-x/Cloudera-Manager-Installation-Guide/cm5ig_install_path_B.html

前期准备工作不多说了

先给每个节点配置镜像源,我这里以节点2为例

[cloudera-manager]
# Packages for Cloudera Manager, Version , on RedHat or CentOS x86_64
name=Cloudera Manager
baseurl=https://archive.cloudera.com/cm5/redhat/6/x86_64/cm/5.13.0/
gpgkey =https://archive.cloudera.com/cm5/redhat/6/x86_64/cm/RPM-GPG-KEY-cloudera
gpgcheck =

卸载centos6.5自带的jdk后就安装jdk,也是3个节点都安装

在节点1安装server

sudo yum install cloudera-manager-daemons cloudera-manager-server

在每个节点都安装agent

sudo yum install cloudera-manager-agent cloudera-manager-daemons

在每个节点 vim /etc/cloudera-scm-agent/config.ini

下载rpm包到电脑上

上传到cm1节点

sudo yum --nogpgcheck localinstall cloudera-cdh-5-0.x86_64.rpm

sudo rpm --import http://archive.cloudera.com/cdh5/redhat/6/x86_64/cdh/RPM-GPG-KEY-cloudera

sudo yum install avro-tools crunch flume-ng hadoop-hdfs-fuse hadoop-hdfs-nfs3 hadoop-httpfs 
hbase-solr hive-hbase hive-webhcat hue-beeswax hue-hbase hue-impala hue-pig hue-plugins hue-rdbms
hue-search hue-spark hue-sqoop hue-zookeeper impala impala-shell kite llama mahout oozie pig pig-udf-datafu search sentry solr-mapreduce spark-python sqoop sqoop2 whirr

安装完之后,在cm1节点启动server服务

在3个节点都启动agent服务

但是没有能打开

查看日志

in org.springframework.beans.factory.support.DefaultListableBeanFactory@1fe903d5: defining beans [commandLineConfigurationBean,entityManagerFactoryBean,com.cloudera.server.cmf.TrialState,com.cloudera.server.cmf.TrialManager,com.cloudera.cmf.crypto.LicenseLoader]; root of factory hierarchy
-- ::, ERROR main:com.cloudera.server.cmf.Main: Server failed.
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.cloudera.server.cmf.TrialState': Cannot resolve reference to bean 'entityManagerFactoryBean' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactoryBean': FactoryBean threw exception on object creation; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: cmf.server] Unable to build EntityManagerFactory
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:)
at org.springframework.beans.factory.support.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java:)
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:)
at org.springframework.beans.factory.support.AbstractBeanFactory$.getObject(AbstractBeanFactory.java:)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:)
at com.cloudera.server.cmf.Main.bootstrapSpringContext(Main.java:)
at com.cloudera.server.cmf.Main.<init>(Main.java:)
at com.cloudera.server.cmf.Main.main(Main.java:)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactoryBean': FactoryBean threw exception on object creation; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: cmf.server] Unable to build EntityManagerFactory
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:)
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:)
at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:)
... more
Caused by: javax.persistence.PersistenceException: [PersistenceUnit: cmf.server] Unable to build EntityManagerFactory
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:)
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:)
at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:)
at com.cloudera.enterprise.CommonMain.setupHibernate(CommonMain.java:)
at com.cloudera.server.cmf.bootstrap.EntityManagerFactoryBean.getObject(EntityManagerFactoryBean.java:)
at com.cloudera.server.cmf.bootstrap.EntityManagerFactoryBean.getObject(EntityManagerFactoryBean.java:)
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:)
... more
Caused by: org.hibernate.service.classloading.spi.ClassLoadingException: HHH010003: JDBC Driver class not found: com.mysql.jdbc.Driver
at org.hibernate.service.jdbc.connections.internal.C3P0ConnectionProvider.configure(C3P0ConnectionProvider.java:)
at org.hibernate.service.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:)
at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.buildJdbcConnectionAccess(JdbcServicesImpl.java:)
at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:)
at org.hibernate.service.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:)
at org.hibernate.cfg.Configuration.buildTypeRegistrations(Configuration.java:)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:)
at org.hibernate.ejb.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:)
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:)
... more
Caused by: org.hibernate.service.classloading.spi.ClassLoadingException: Unable to load class [com.mysql.jdbc.Driver]
at org.hibernate.service.classloading.internal.ClassLoaderServiceImpl.classForName(ClassLoaderServiceImpl.java:)
at org.hibernate.service.jdbc.connections.internal.C3P0ConnectionProvider.configure(C3P0ConnectionProvider.java:)
... more
Caused by: java.lang.ClassNotFoundException: Could not load requested class : com.mysql.jdbc.Driver
at org.hibernate.service.classloading.internal.ClassLoaderServiceImpl$AggregatedClassLoader.findClass(ClassLoaderServiceImpl.java:)
at java.lang.ClassLoader.loadClass(ClassLoader.java:)
at java.lang.ClassLoader.loadClass(ClassLoader.java:)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:)
at org.hibernate.service.classloading.internal.ClassLoaderServiceImpl.classForName(ClassLoaderServiceImpl.java:)
... more
[root@cm1 cloudera-scm-server]# pwd
/var/log/cloudera-scm-server
[root@cm1 cloudera-scm-server]# cat cloudera-scm-server.log

没有安装数据库的驱动

sudo yum install mysql-server

我们登录进mysql

create database amon DEFAULT CHARACTER SET utf8;
grant all on amon.* TO 'amon'@'%' IDENTIFIED BY 'amon_password';
grant all on *.* TO 'amon'@'cm1' IDENTIFIED BY 'amon_password';
grant all on amon.* TO 'amon'@'localhost' IDENTIFIED BY 'amon_password'; create database rman DEFAULT CHARACTER SET utf8;
grant all on rman.* TO 'rman'@'%' IDENTIFIED BY 'rman_password';
grant all on *.* TO 'rman'@'cm1' IDENTIFIED BY 'rman_password';
grant all on rman.* TO 'rman'@'localhost' IDENTIFIED BY 'rman_password'; create database nav DEFAULT CHARACTER SET utf8;
grant all on nav.* TO 'nav'@'%' IDENTIFIED BY 'nav_password';
grant all on *.* TO 'nav'@'cm1' IDENTIFIED BY 'nav_password';
grant all on nav.* TO 'nav'@'localhost' IDENTIFIED BY 'nav_password'; create database hive DEFAULT CHARACTER SET utf8;
grant all on hive.* TO 'hive'@'%' IDENTIFIED BY 'hive_password';
grant all on *.* TO 'hive'@'cm1' IDENTIFIED BY 'hive_password';
grant all on hive.* TO 'hive'@'localhost' IDENTIFIED BY 'hive_password';

create database scm DEFAULT CHARACTER SET utf8;
grant all on scm.* TO 'scm'@'%' IDENTIFIED BY 'scm_password';
grant all on *.* TO 'scm'@'cm1' IDENTIFIED BY 'scm_password';
grant all on scm.* TO 'scm'@'localhost' IDENTIFIED BY 'scm_password';

create database oozie DEFAULT CHARACTER SET utf8;
grant all on oozie.* TO 'oozie'@'localhost' IDENTIFIED BY 'oozie_password';
grant all on *.* TO 'oozie'@'cm1' IDENTIFIED BY 'oozie_password';
grant all on oozie.* TO 'oozie'@'%' IDENTIFIED BY 'oozie_password';

create database hue DEFAULT CHARACTER SET utf8;
grant all on hue.* TO 'hue'@'localhost' IDENTIFIED BY 'hue_password';
grant all on *.* TO 'hue'@'cm1' IDENTIFIED BY 'hue_password';
grant all on hue.* TO 'hue'@'%' IDENTIFIED BY 'hue_password';
flush privileges;

flush privileges;

mysql> create database amon DEFAULT CHARACTER SET utf8;
Query OK, row affected (0.00 sec) mysql> grant all on amon.* TO 'amon'@'%' IDENTIFIED BY 'amon_password';
Query OK, rows affected (0.00 sec) mysql> grant all on *.* TO 'amon'@'cm1' IDENTIFIED BY 'amon_password';
Query OK, rows affected (0.00 sec) mysql> grant all on amon.* TO 'amon'@'localhost' IDENTIFIED BY 'amon_password';
Query OK, rows affected (0.00 sec) mysql> create database rman DEFAULT CHARACTER SET utf8;
Query OK, row affected (0.00 sec) mysql> grant all on rman.* TO 'rman'@'%' IDENTIFIED BY 'rman_password';
Query OK, rows affected (0.00 sec) mysql> grant all on *.* TO 'rman'@'cm1' IDENTIFIED BY 'rman_password';
Query OK, rows affected (0.00 sec) mysql> grant all on rman.* TO 'rman'@'localhost' IDENTIFIED BY 'rman_password';
Query OK, rows affected (0.00 sec) mysql> create database nav DEFAULT CHARACTER SET utf8;
Query OK, row affected (0.00 sec) mysql> grant all on nav.* TO 'nav'@'%' IDENTIFIED BY 'nav_password';
Query OK, rows affected (0.00 sec) mysql> grant all on *.* TO 'nav'@'cm1' IDENTIFIED BY 'nav_password';
Query OK, rows affected (0.00 sec) mysql> grant all on nav.* TO 'nav'@'localhost' IDENTIFIED BY 'nav_password';
Query OK, rows affected (0.00 sec) mysql> create database metastore DEFAULT CHARACTER SET utf8;
Query OK, row affected (0.00 sec) mysql> grant all on hive.* TO 'hive'@'%' IDENTIFIED BY 'hive_password';
Query OK, rows affected (0.00 sec) mysql> grant all on *.* TO 'hive'@'cm1' IDENTIFIED BY 'hive_password';
Query OK, rows affected (0.00 sec) mysql> grant all on *.* TO 'hive'@'cm1' IDENTIFIED BY 'hive_password';
Query OK, rows affected (0.00 sec) mysql>flush privileges;

在节点1执行

sudo /usr/share/cmf/schema/scm_prepare_database.sh mysql scm scm scm_password

把服务重启一下server (节点1)  agent(3个节点)

打开这个地址http://192.168.86.141:7180/

下一步如果安装失败了

而且出现这情况

就这样解决

如果是出现cloudemanager安装时出现8475 MainThread agent ERROR Heartbeating to 出门cm1:7180 failed这样的问题

就这样解决

遇到这情况就重新运行一下

用find / -name cm_guid查找 cm_guid文件

然后把他删除了(3个节点都这样)

遇到这种问题

查看agent日志

Failed to connect to previous supervisor

在线安装CM集群的更多相关文章

  1. 在线安装TIDB集群

     在线安装TiDB集群 服务器准备 说明:TiDB8需要能够连接外网,以便下载各类安装包 TiDB4非必须,但最好是有一台,因为后续测试Mysql数据同步或者进行性能比较时,都要用到 TiKV最好是采 ...

  2. centos7.0 安装redis集群

    生产环境下redis基本上都是用的集群,毕竟单机版随时都可能挂掉,风险太大.这里我就来搭建一个基本的redis集群,功能够用但是还需要完善,当然如果有钱可以去阿里云买云数据库Redis版的,那个还是很 ...

  3. CentOS7 搭建Ambari-Server,安装Hadoop集群(一)

    2017-07-05:修正几处拼写错误,之前没发现,抱歉! 第一次在cnblogs上发表文章,效果肯定不会好,希望各位多包涵. 编写这个文档的背景是月中的时候,部门老大希望我们能够抽时间学习一下Had ...

  4. linux下redis的安装和集群搭建

    一.redis概述 1.1.目前redis支持的cluster特性: 1):节点自动发现. 2):slave->master 选举,集群容错. 3):Hot resharding:在线分片. 4 ...

  5. [k8s]kubespray(ansible)自动化安装k8s集群

    kubespray(ansible)自动化安装k8s集群 https://github.com/kubernetes-incubator/kubespray https://kubernetes.io ...

  6. CentOS7 Cloudera Manager6 完全离线安装 CDH6 集群

    本文是在CentOS7.4 下进行CDH6集群的完全离线部署.CDH5集群与CDH6集群的部署区别比较大. 说明:本文内容所有操作都是在root用户下进行的. 文件下载 首先一些安装CDH6集群的必须 ...

  7. Kubernetes全栈架构师(Kubeadm高可用安装k8s集群)--学习笔记

    目录 k8s高可用架构解析 Kubeadm基本环境配置 Kubeadm系统及内核升级 Kubeadm基本组件安装 Kubeadm高可用组件安装 Kubeadm集群初始化 高可用Master及Token ...

  8. 基于yum安装CDH集群

    一.环境准备 准备至少3台设备:CentOS7系统: 如果是在实验环境下,给虚拟机的内存至少4G,根建议1T,数据盘1T,由于是虚拟机,所以根分区和数据盘放心大胆的给:如果是在生产环境则多多益善:我这 ...

  9. 安装ClouderaManager以及使用ClouderaManager安装分布式集群的若干细节

    目录 前言 整体介绍 分步安装介绍 总结 一.前言        周末干了近四十个小时中间只休息了五个小时终于成功安装了ClouderaManager以及分布式集群,其中各种辛酸无以言表,唯有泪两行. ...

随机推荐

  1. windows下尝试编写node模块

    1,首先参考http://www.cnblogs.com/yupeng/p/3469444.html写了一个模块 2,按照指引运行 F:\Program Files\nodejs\mymodule&g ...

  2. MySQL 5.7新特性之在线收缩undo表空间

    1. MySQL 5.5时代的undo log 在MySQL5.5以及之前,大家会发现随着数据库上线时间越来越长,ibdata1文件(即InnoDB的共享表空间,或者系统表空间)会越来越大,这会造成2 ...

  3. mysql之 CentOS系统针对mysql参数优化

    内核相关参数(/etc/sysctl.conf)  以下参数可以直接放到sysctl.conf文件的末尾: net.core.somaxconn = 65535 net.core.netdev_max ...

  4. requestAnimationFrame 持续动画效果

    1. requestAnimationFrame 概述 requestAnimationFrame 是浏览器用于定时循环操作的一个API, 类似于setTimeout, 主要用途是按帧对网页进行重绘. ...

  5. js判斷是否是正整數

    var curt_page = $("input[name='curt_page']").val(); if (!(/(^[1-9]\d*$)/.test(curt_page))) ...

  6. Hadoop yarn工作流程详解

    yarn是什么?1.它是一个资源调度及提供作业运行的系统环境平台 资源:cpu.mem等 作业:map task.reduce Task yarn产生背景?它是从hadoop2.x版本才引入1.had ...

  7. sbt第一次运行下载jar包很慢解决办法

    一.补充sbt配置文件,添加下载路径 文件结构如下:修改了sbtconfig.txt,repo.properties. sbtconfig.txt配置内容为: # Set the java args  ...

  8. ML: 降维算法-LDA

    判别分析(discriminant analysis)是一种分类技术.它通过一个已知类别的“训练样本”来建立判别准则,并通过预测变量来为未知类别的数据进行分类.判别分析的方法大体上有三类,即Fishe ...

  9. JavaScript 基本数据类型和引用类型的区别详解

    js基本数据类型: js基本数据类型包括:undefined,null,number,boolean,string.基本数据类型是按值访问的,就是说我们可以操作保存在变量中的实际的值 1. 基本数据类 ...

  10. C# .NET 4.5 将多个文件添加到压缩包中

    string zipFilePath = @"d:\test.zip"; string file1 = @"D:\门头照处理\门店照片2018-3-19 wuxl\门店照 ...