Centos7.x 安装 CDH 6.x

前置条件

  1. ntp服务安装
  2. 防火墙关闭

执行以下优化代码

systemctl stop firewalld.service 
echo  "* soft    nofile  128000" >>/etc/security/limits.conf 
echo  "* hard    nofile  128000" >>/etc/security/limits.conf 
echo  "* soft    nproc  128000" >>/etc/security/limits.conf 
echo  "* hard    nproc  128000" >>/etc/security/limits.conf 
cat /etc/security/limits.conf
sed -i 's/4096/unlimited/' /etc/security/limits.d/20-nproc.conf
cat /etc/security/limits.d/20-nproc.conf
sed -i 's/4096/unlimited/' /etc/security/limits.d/90-nproc.conf
cat /etc/security/limits.d/90-nproc.conf
ulimit -SHn 128000
ulimit -SHu 128000echo  "vm.swappiness=10" >>/etc/sysctl.conf
sysctl -p
sysctl -a|grep swappiness
echo  "net.core.somaxconn = 32768 " >>/etc/sysctl.conf
sysctl -p
sysctl -a|grep somaxconn
echo never > /sys/kernel/mm/transparent_hugepage/defrag
echo never > /sys/kernel/mm/transparent_hugepage/enabled

 

CDH6.2 下载信息

https://www.cloudera.com/documentation/enterprise/6/release-notes/topics/rg_cdh_62_download.html
yum安装:https://archive.cloudera.com/cdh6/6.2.0/redhat7/yum/
parcel安装:https://archive.cloudera.com/cdh6/6.2.0/parcels/

 

 

 

这里我们讲解使用 parcel 方式安装

 

ClouderaManager 安装包下载

https://archive.cloudera.com/cm6/6.2.0/redhat7/yum/RPMS/x86_64/cloudera-manager-agent-6.2.0-968826.el7.x86_64.rpm
https://archive.cloudera.com/cm6/6.2.0/redhat7/yum/RPMS/x86_64/cloudera-manager-daemons-6.2.0-968826.el7.x86_64.rpm
https://archive.cloudera.com/cm6/6.2.0/redhat7/yum/RPMS/x86_64/cloudera-manager-server-6.2.0-968826.el7.x86_64.rpm
https://archive.cloudera.com/cm6/6.2.0/redhat7/yum/RPMS/x86_64/cloudera-manager-server-db-2-6.2.0-968826.el7.x86_64.rpm
https://archive.cloudera.com/cm6/6.2.0/redhat7/yum/RPMS/x86_64/enterprise-debuginfo-6.2.0-968826.el7.x86_64.rpm
https://archive.cloudera.com/cm6/6.2.0/redhat7/yum/RPMS/x86_64/oracle-j2sdk1.8-1.8.0+update181-1.x86_64.rpm
https://archive.cloudera.com/cm6/6.2.0/allkeys.asc

CDH 安装包下载

https://archive.cloudera.com/cdh6/6.2.0/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373-el7.parcel
https://archive.cloudera.com/cdh6/6.2.0/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373-el7.parcel.sha1
https://archive.cloudera.com/cdh6/6.2.0/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373-el7.parcel.sha256
https://archive.cloudera.com/cdh6/6.2.0/parcels/manifest.json

安装 createrepo

作用:createrepo 命令用于创建yum源(软件仓库),即为存放于本地特定位置的众多rpm包建立索引,描述各包所需依赖信息,并形成元数据。

yum install -y createrepo

在CM目录下执行 createrepo . 生成rpm源

[root@cdh01 CM]# createrepo .
Spawning worker 0 with 1 pkgs
Spawning worker 1 with 1 pkgs
Spawning worker 2 with 1 pkgs
Spawning worker 3 with 1 pkgs
Spawning worker 4 with 1 pkgs
Spawning worker 5 with 1 pkgs
Spawning worker 6 with 0 pkgs
Spawning worker 7 with 0 pkgs
Spawning worker 8 with 0 pkgs
Spawning worker 9 with 0 pkgs
Spawning worker 10 with 0 pkgs
Spawning worker 11 with 0 pkgs
Spawning worker 12 with 0 pkgs
Spawning worker 13 with 0 pkgs
Spawning worker 14 with 0 pkgs
Spawning worker 15 with 0 pkgs
Spawning worker 16 with 0 pkgs
Spawning worker 17 with 0 pkgs
Spawning worker 18 with 0 pkgs
Spawning worker 19 with 0 pkgs
Spawning worker 20 with 0 pkgs
Spawning worker 21 with 0 pkgs
Spawning worker 22 with 0 pkgs
Spawning worker 23 with 0 pkgs
Workers Finished
Saving Primary metadata
Saving file lists metadata
Saving other metadata
Generating sqlite DBs
Sqlite DBs complete

安装 httpd 服务

yum install -y httpd

启动服务

 systemctl start httpdsystemctl status httpd

将CM 与 CDH 目录移动到目录 /var/www/html/ 下

mv CM/ CDH/ /var/www/html/

验证是否安装成功,访问 http://ip/CM ,http://ip/CDH

显示如下即可

提示以下内容说明没有成功,原因是 SELinux 未禁用成功,在所有服务器执行 setenforce 0  即可

配置安装源

vim /etc/yum.repos.d/cm.repo
[cmrepo]
name = cm_repo
baseurl = http://ip/CM
enable = true
gpgcheck = false

安装JDK

yum install oracle-j2sdk1.8-1.8.0+update181-1.x86_64

安装 Cloudera Manager Server

yum install -y cloudera-manager-server

到这里CM服务端安装完成,先不要启动,安装数据库

安装MariaDB

        MariaDB数据库管理系统是MySQL的一个分支,主要由开源社区在维护,采用GPL授权许可 MariaDB的目的是完全兼容MySQL,包括API和命令行,使之能轻松成为MySQL的代替品。在存储引擎方面,使用XtraDB(英语:XtraDB)来代替MySQL的InnoDB。 MariaDB由MySQL的创始人Michael Widenius(英语:Michael Widenius)主导开发,他早前曾以10亿美元的价格,将自己创建的公司MySQL AB卖给了SUN,此后,随着SUN被甲骨文收购,MySQL的所有权也落入Oracle的手中。MariaDB名称来自Michael Widenius的女儿Maria的名字。

       MariaDB基于事务的Maria存储引擎,替换了MySQL的MyISAM存储引擎,它使用了Percona的 XtraDB,InnoDB的变体,分支的开发者希望提供访问即将到来的MySQL 5.4 InnoDB性能。这个版本还包括了 PrimeBase XT (PBXT) 和 FederatedX存储引擎。

yum -y install mariadb
yum -y install mariadb-server

启动、配置MariaDB

systemctl start mariadb
[root@cdh01 ~]# /usr/bin/mysql_secure_installationNOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDBSERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!In order to log into MariaDB to secure it, we'll need the current
password for the root user.  If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.Enter current password for root (enter for none): 
OK, successfully used password, moving on...Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.Set root password? [Y/n] y #设置root密码
New password: 
Re-enter new password: 
Password updated successfully!
Reloading privilege tables..... Success!By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them.  This is intended only for testing, and to make the installation
go a bit smoother.  You should remove them before moving into a
production environment.Remove anonymous users? [Y/n] y #是否禁止匿名登录... Success!Normally, root should only be allowed to connect from 'localhost'.  This
ensures that someone cannot guess at the root password from the network.Disallow root login remotely? [Y/n] n #是否禁止远程登录... skipping.By default, MariaDB comes with a database named 'test' that anyone can
access.  This is also intended only for testing, and should be removed
before moving into a production environment.Remove test database and access to it? [Y/n] y #删除测试数据库- Dropping test database...... Success!- Removing privileges on test database...... Success!Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.Reload privilege tables now? [Y/n] y #加载最新设置... Success!Cleaning up...All done!  If you've completed all of the above steps, your MariaDB
installation should now be secure.Thanks for using MariaDB!

登录mysql 创建数据库

mysql -uroot -p123456 create database metastore default character set utf8;  #创建数据库名称为metastore,默认编码utf-8
CREATE USER 'hive'@'%' IDENTIFIED BY '123456';    #创建用户名为hive的用户,密码为123456,可以在任何机器上访问
GRANT ALL PRIVILEGES ON metastore. * TO 'hive'@'%';   #授权hive用户metastore所有权限
FLUSH PRIVILEGES;   #刷新配置create database cm default character set utf8;  
CREATE USER 'cm'@'%' IDENTIFIED BY '123456';   
GRANT ALL PRIVILEGES ON cm. * TO 'cm'@'%';   
FLUSH PRIVILEGES;  create database hue default character set utf8;   
CREATE USER 'hue'@'%' IDENTIFIED BY '123456';    
GRANT ALL PRIVILEGES ON hue. * TO 'hue'@'%';    
FLUSH PRIVILEGES;create database oozie default character set utf8;   
CREATE USER 'oozie'@'%' IDENTIFIED BY '123456';    
GRANT ALL PRIVILEGES ON oozie. * TO 'oozie'@'%';    
FLUSH PRIVILEGES;create database sentry default character set utf8;   
CREATE USER 'sentry'@'%' IDENTIFIED BY '123456';    
GRANT ALL PRIVILEGES ON sentry. * TO 'sentry'@'%';    
FLUSH PRIVILEGES;

安装Mysql驱动

此处不安装,服务无法找到mysql驱动,会导致服务失败,集群所有服务都安装,避免以后遇到问题

[root@cdh01 cdh]# mkdir  /usr/share/java 
[root@cdh01 cdh]# mv mysql-connector-java-5.1.30.jar /usr/share/java/
[root@cdh01 cdh]# chmod 777 /usr/share/java/mysql-connector-java-5.1.30.jar 
[root@cdh01 cdh]# ln -s /usr/share/java/mysql-connector-java-5.1.30.jar /usr/share/java/mysql-connector-java.jar 
[root@cdh01 cdh]# ll /usr/share/java/
总用量 932
-rwxrwxrwx. 1 root root 954038 6月  19 11:28 mysql-connector-java-5.1.30.jar
lrwxrwxrwx. 1 root root     47 9月   1 13:59 mysql-connector-java.jar -> /usr/share/java/mysql-connector-java-5.1.30.jar

Cloudera Manager Server 初始化数据库

注意这里 123456 是我们上一步创建的数据库密码

[root@cdh01 ~]# /opt/cloudera/cm/schema/scm_prepare_database.sh mysql cm cm 123456
JAVA_HOME=/usr/local/java/jdk1.8.0_191
Verifying that we can write to /etc/cloudera-scm-server
Creating SCM configuration file in /etc/cloudera-scm-server
Executing:  /usr/local/java/jdk1.8.0_191/bin/java -cp /usr/share/java/mysql-connector-java.jar:/usr/share/java/oracle-connector-java.jar:/usr/share/java/postgresql-connector-java.jar:/opt/cloudera/cm/schema/../lib/* com.cloudera.enterprise.dbutil.DbCommandExecutor /etc/cloudera-scm-server/db.properties com.cloudera.cmf.db.
[                          main] DbCommandExecutor              INFO  Successfully connected to database.
All done, your SCM database is configured correctly!

启动Cloudera Manager Server 服务

systemctl start cloudera-scm-server
systemctl status cloudera-scm-server

启动可能需要半分钟左右,可以查看日志启动状态,提示如下内容就启动成功了

日志目录:/var/log/cloudera-scm-server

2019-09-01 14:05:02,994 INFO WebServerImpl:org.eclipse.jetty.server.AbstractConnector: Started ServerConnector@534fca49{HTTP/1.1,[http/1.1]}{0.0.0.0:7180}
2019-09-01 14:05:02,995 INFO WebServerImpl:org.eclipse.jetty.server.Server: Started @95217ms
2019-09-01 14:05:02,995 INFO WebServerImpl:com.cloudera.server.cmf.WebServerImpl: Started Jetty server.

浏览器访问,提示登录,默认账号密码均为 admin

http://ip:7180/cmf/login

接受继续

这里选择免费版本(也可以选择试用版,到期后自动恢复成免费版本)

开始安装集群

 

选择我们刚刚安装的httpd服务链接

agent 安装成功,下一步

安装 parcel ,这个过程可能要等一段时间

 

 

这里我们看下检查结果

有两处异常,根据提示修改配置:

 sysctl vm.swappiness=10 修改CDH建议值,重新检测。

解决了第一个问题

设置一下两个配置

echo never > /sys/kernel/mm/transparent_hugepage/defrag
echo never > /sys/kernel/mm/transparent_hugepage/enabled

再次查看,全部正常

 

根据需求自己分配角色

安装成功

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/509884.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

Windows IEDA 编译Hbase源码报错 - 无法执行shell脚本

windows 下编译 hbase源码,报错 [ERROR] Command execution failed. java.io.IOException: Cannot run program "bash" (in directory "D:\File\ideaWorkspace\hbase-1.4.10-src\hbase-1.4.10\hbase-shaded\hbase-shaded-check-invariants\target\…

最新版 VMware 安装,虚拟机安装, Ubuntu可视化linux系统安装

一、下载 地址:https://www.vmware.com/cn.html 二、安装VM 选择相应配置,一直下一步即可 双击打开VMware,输入密钥:CG392-4PX5J-H816Z-HYZNG-PQRG2 Ubuntu 镜像下载地址: https://www.ubuntu.com/download/desktop/…

Flink 集群搭建安装 CentOS 7.x 版本

基本准备: JDK免密登录(不设置后期启动可以手动输入密码)Centos 7.x 一、下载Flink 下载地址:http://flink.apache.org/downloads.html 我这里使用:https://www.apache.org/dyn/closer.lua/flink/flink-1.9.0/flin…

web通讯录之登录注册界面

登录页面: 功能说明:登录页面是在页面模糊背景网站中找的素材加以修改成自己想要的登录界面,我们老师让我们在登录时候加验证码,看了大部分人用的是签名登录方式,觉得没有什么特色因此设计了滑动登录,把验证…

使用IntelliJ IDEA导入 Flink 消费kafka报错 Error: A JNI error has occurred, please check your installation an

提示找不到类,pom中已经引用了jar包,使用eclipse也可以执行,就是IntelliJ不行 java.lang.NoClassDefFoundError: org/apache/flink/api/common/serialization/DeserializationSchemaat java.lang.Class.getDeclaredMethods0(Native Method)a…

有限状态机/FSM

有限状态机(FSM)的设计与实现(一) 有限状态机(FSM)是表示有限个状态及在这些状态之间的转移和动作等行为的数学模型,在计算机领域有着广泛的应用。通常FSM包含几个要素:状态的管理、…

web通讯录之通讯录主界面

界面展示: 界面所用的素材网址点击打开链接,在用网上素材时候首先要把代码看懂才能进行修改,因此希望读者好好看看源码,看的时候着重看看字母排序原理、JQuery设计等等。 分组展示:这个地方有个不好的地方&#xff0c…

NameNode 启动失败 - There appears to be a gap in the edit log. We expected txid xxx, but got tx

场景 NameNode迁移,导致一个节点无法启动 异常 在Namenode主动迁移,或者Namenode机器挂掉无法恢复时,我们需要Namenode节点迁移,迁移经常会出现一个NameNode启动成功,另外一个standby启动失败,报错如下 …

opengl光照

看一张图片: 图中绘制了两个大小相同的白色球体。其中右边的一个是没有使用任何光照效果的,它看起来就像是一个二维的圆盘,没有立体的感觉。左边的一个是使用了简单的光照效果的,我们通过光照的层次,很容易的认为它是一…

Nifi 之 kafka消费存入hbase

添加kafka processor,配置如下 kakfa数据格式为JSON: {"events_tag":"103913","query_word":"华大癌变 虎嗅","time":"2018-08-09 13:01:11"} 添加putHbaseJSON,json格式添加数…

web通讯录之搜索功能

手机号搜索: 姓名搜索: 拼音搜索: 城市搜索: 性别搜索: 点击姓名或者电话显示完整信息 相信大家期待自己所写的搜索功能类似于百度、谷歌这种搜索引擎,有兴趣的读者可以去学学SEO,在这里我…

Hbase 删表过程

Hbase 执行删表命令后(drop),表的数据会移动到 /hbase/archive 目录下,并不会直接从hdfs删除,后台会有进程定期去检查(默认五分钟),如果这张表没有快照则会删除,有快照会保留数据。 刚drop时&a…

opengl纹理单元

可以这样简单的理解为:显卡中有N个纹理单元(具体数目依赖你的显卡能力),每个纹理单元(GL_TEXTURE0、GL_TEXTURE1等)都有GL_TEXTURE_1D、GL_TEXTURE_2D等,如下代码: [cpp] view plain…

Spark 创建 hive表报错 ROW FORMAT DELIMITED is only compatible with 'textfile', not 'parquet'

场景: 在spark分析数据时,创建hive表失败。 提示异常 : 19/10/09 10:59:18 INFO execution.SparkSqlParser: Parsing command: CREATE EXTERNAL TABLE IF NOT EXISTS dm_xxx.user_area(biFollowersCount String,city String,created_at Str…

多重纹理和纹理组合器

多重纹理和纹理组合器 本文主要介绍OpenGL中两种技术的使用方法:多重纹理技术和纹理组合器技术,最终根据参考【2】中的代码,实现了两个简单的演示DEMO,其中使用到了《八叉树颜色量化、BMP、TGA文件解析》篇章中提供的图像解析类。…

ClouderaManager agent 报错,无法连接到结群 Error, CM server guid updated, expected xxx , received xxx

场景 集群版本:CDH 6.0.1 服务器版本:Centos 7.3 JAVA版本:1.8 异常出现原因 搭建集群中遇到异常,删除agent节点,重新部署CM后发现异常,CDH处于无法使用状态 异常 查看agent日志会出现,说无法连接到…

CDH Kerberos 认证下Kafka 消费方式

集群Kerberos认证安装参考:https://datamining.blog.csdn.net/article/details/98480008 目录 环境: 配置 Java Producer 代码 文件内容: kafka_client_jaas.conf krb5.conf ( kerberos 配置文件复制过来即可) kafka.keytab Java Co…

IntelliJ IDEA Maven jar包冲突解决,快速发现jar包冲突

IntelliJ IDEA 自带的Diagrams 去查看jar包冲突相当费劲 ~ ,安装个插件即可快速解决该问题 打开Settings,搜索maven helper,并安装 安装完成后,直接打开pom文件,点击Dependency Analyzer 删除冲突jar包,在…

osg基本图元

OSG绘制几何体学习总结(超全)在osg中,场景图形采用一种自顶向下的,分层的树状数据结构来组织空间数据集,以提高渲染的效率 场景图形树结构的顶部是一个根节点,从根节点向下延伸,各个组节点中均包…

如何用css设计出商品购物图片

代码: 常见问题:背景填充时候图片大小不一致、重复等等问题,建议在插入图片的时候最好不用img标签直接在div中添加背景图片,有利于对背景图片的更改。 插入图片:background-image: url(../img/product-auto/benz-amg-s…