在线安装CM集群
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集群的更多相关文章
- 在线安装TIDB集群
在线安装TiDB集群 服务器准备 说明:TiDB8需要能够连接外网,以便下载各类安装包 TiDB4非必须,但最好是有一台,因为后续测试Mysql数据同步或者进行性能比较时,都要用到 TiKV最好是采 ...
- centos7.0 安装redis集群
生产环境下redis基本上都是用的集群,毕竟单机版随时都可能挂掉,风险太大.这里我就来搭建一个基本的redis集群,功能够用但是还需要完善,当然如果有钱可以去阿里云买云数据库Redis版的,那个还是很 ...
- CentOS7 搭建Ambari-Server,安装Hadoop集群(一)
2017-07-05:修正几处拼写错误,之前没发现,抱歉! 第一次在cnblogs上发表文章,效果肯定不会好,希望各位多包涵. 编写这个文档的背景是月中的时候,部门老大希望我们能够抽时间学习一下Had ...
- linux下redis的安装和集群搭建
一.redis概述 1.1.目前redis支持的cluster特性: 1):节点自动发现. 2):slave->master 选举,集群容错. 3):Hot resharding:在线分片. 4 ...
- [k8s]kubespray(ansible)自动化安装k8s集群
kubespray(ansible)自动化安装k8s集群 https://github.com/kubernetes-incubator/kubespray https://kubernetes.io ...
- CentOS7 Cloudera Manager6 完全离线安装 CDH6 集群
本文是在CentOS7.4 下进行CDH6集群的完全离线部署.CDH5集群与CDH6集群的部署区别比较大. 说明:本文内容所有操作都是在root用户下进行的. 文件下载 首先一些安装CDH6集群的必须 ...
- Kubernetes全栈架构师(Kubeadm高可用安装k8s集群)--学习笔记
目录 k8s高可用架构解析 Kubeadm基本环境配置 Kubeadm系统及内核升级 Kubeadm基本组件安装 Kubeadm高可用组件安装 Kubeadm集群初始化 高可用Master及Token ...
- 基于yum安装CDH集群
一.环境准备 准备至少3台设备:CentOS7系统: 如果是在实验环境下,给虚拟机的内存至少4G,根建议1T,数据盘1T,由于是虚拟机,所以根分区和数据盘放心大胆的给:如果是在生产环境则多多益善:我这 ...
- 安装ClouderaManager以及使用ClouderaManager安装分布式集群的若干细节
目录 前言 整体介绍 分步安装介绍 总结 一.前言 周末干了近四十个小时中间只休息了五个小时终于成功安装了ClouderaManager以及分布式集群,其中各种辛酸无以言表,唯有泪两行. ...
随机推荐
- Swagger2的使用及注意事项
一.Swagger的主要作用有两方面: 1.生成在线文档,通过注解方式生成在线文档,方便在定义修正接口时直接修改接口文档: 2.对接口文档在线测试,不用在输入接口地址以及里面的参数对象,可以很方便的对 ...
- 一个简单的web.py论坛
一.概述 forum是一个简单的web.py论坛,后端采用Python+web.py+MySQL,前端采用HTML+CSS+JavaScript+jQuery+RequireJS. 该论坛的主要功能包 ...
- mysql之 表数据存放路径非datadir目录
假如,新建一张表,并让该表的存储路径 不是默认的/path/to/datadir/dbname .而是 指定存储的位置 应该如何处理? 方法一shell> mkdir /Generalt1she ...
- taro 事件处理
https://nervjs.github.io/taro/docs/event.html Taro 元素的事件处理和 DOM 元素的很相似.但是有一点语法上的不同: Taro 事件绑定属性的命名采用 ...
- hdfs 例子
package hadoop; import java.io.IOException; import java.net.URI; import java.net.URISyntaxException; ...
- js 去除字符串第一位逗号的方法
<script type="text/javascript"> var s=',123456'; if (s.substr(0,1)==',') s=s.substr( ...
- 【python】序列化和反序列化
序列化可以理解为:把python的对象编码转换为json格式的字符串,反序列化可以理解为:把json格式字符串解码为python数据对象.在python的标准库中,专门提供了json库与pickle库 ...
- 调试PHP错误
error_reporting(E_ALL & ~E_NOTICE); ini_set('display_errors', "On");
- 迭代器和增强for
增强for 内部原理其实是个Iterator迭代器,所以在遍历的过程中,不能对集合中的元素进行增删操作. 格式: for(元素的数据类型 变量 : Collection集合or数组){ } 它用于遍 ...
- spring4.0之三:@RestController
spring4.0重要的一个新的改进是@RestController注解,它继承自@Controller注解.4.0之前的版本,Spring MVC的组件都使用@Controller来标识当前类是一个 ...