ImageVerifierCode 换一换
格式:DOCX , 页数:71 ,大小:3.05MB ,
资源ID:3648751      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/3648751.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(CDH514部署手册.docx)为本站会员(b****5)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

CDH514部署手册.docx

1、 CDH514 部署手册部署手册 CDH大数据集群部署手册 cdh5.14 版本 一、概述 针对海尔大数据应用的需求,本文完成了 CDH5.12大数据集群的部署,并记录了详细步骤。二、集群部署准备 1.集群硬件信息 1.1集群各主机 IP与主机名映射表 1.2主机 qdcdh00-01 内存情况:主机 qdcdh02-09内存情况:1.3主机逻辑 cpu 个数:$cat/proc/cpuinfo|grep processor|wc-l 主机物理 cpu 个数:$cat/proc/cpuinfo|grep physical id|sort-u|wc-l 主机单个 cpu 核心数:$cat/pro

2、c/cpuinfo|grep cpu cores|sort-u 主机单个 cpu core 线程数:$lscpu|grep Thread 主机 qdcdh00-01的 cpu 信息:主机 qdcdh02-09的 cpu 信息:1.4主机硬盘分区情况查看命令:$df-h 主机 qdcdh00-04硬盘分区情况:主机 qdcdh05-09硬盘分区情况:2.集群服务部署规划 2.1集群各主机角色分为四类:边缘节点一台(qdcdh00)、管理节点一台(qdcdh01)、主节点三台(qdcdh02-04)和数据节点五台(qdcdh05-09);2.2各服务在集群主机上的分配:服务主机 qdcdh00 q

3、dcdh01 qdcdh02 qdcdh03 qdcdh04 qdcdh05-9 CM服务 Server Server(未启用)Agen Agen Agen Agen Database Mysql(M)Mysql(S)kerberos KDC(M)KDC(S)openldap Server(M)Server(M)HAProxy Server HDFS Gateway Namenode Namenode Datanode YARN Gateway History Resource manager Resource manager Node Manager server Hive hiveserv

4、er2 hiveserver2 metastore Impala catalog statestore impalad HBase Gateway master master master Region Spark gateway history server gateway Oozie server Sqoop Gateway server Zookeeper server server server Kafka Kudu master master master tablet Sentry Gateway server Hue server/LB server 3.管理节点到其他节点免密钥

5、配置 3.1配置 qdcdh01 到其他主机的免密钥登录:$ssh-keygen-t rsa$ssh-copy-id qdcdh00-9 4.系统优化 4.1调整 swap分区的使用:$echo vm.swappiness=1 /etc/sysctl.conf$sysctl-p 4.2关闭透明大页:$echo never /sys/kernel/mm/transparent_hugepage/defrag$echo never /sys/kernel/mm/transparent_hugepage/enabled 将这两句添加到/etc/rc.local 中。5.时钟同步 5.1设置 qdcd

6、h01 为 ntp server,修改/etc/ntp.conf文件,将红色部分内容注释,添加蓝色内容:rootqdcdh01 cdh_install#cat/etc/ntp.conf#For more information about this file,see the man pages#ntp.conf(5),ntp_acc(5),ntp_auth(5),ntp_clock(5),ntp_misc(5),ntp_mon(5).driftfile/var/lib/ntp/drift#Permit time synchronization with our time source,but

7、do not#permit the source to query or modify the service on this system.restrict default kod nomodify notrap nopeer noquery restrict-6 default kod nomodify notrap nopeer noquery#Permit all access over the loopback interface.This could#be tightened as well,but to do so would effect some of#the adminis

8、trative functions.restrict 127.0.0.1 restrict-6:1#Hosts on local network are less restricted.#restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap#Use public servers from the pool.ntp.org project.#Please consider joining the pool(http:/www.pool.ntp.org/join.html).#server 0.centos.pool.ntp.org ibu

9、rst#server 1.centos.pool.ntp.org iburst#server 2.centos.pool.ntp.org iburst#server 3.centos.pool.ntp.org iburst server 127.127.1.0 fudge 127.127.1.0 stratum 8 restrict 10.138.225.0 mask 255.255.255.0 nomodify notrap#broadcast 192.168.1.255 autokey#broadcast server#broadcastclient#broadcast client#br

10、oadcast 224.0.1.1 autokey#multicast server#multicastclient 224.0.1.1#multicast client#manycastserver 239.255.254.254#manycast server#manycastclient 239.255.254.254 autokey#manycast client#Enable public key cryptography.#crypto includefile/etc/ntp/crypto/pw#Key file containing the keys and key identi

11、fiers used when operating#with symmetric key cryptography.keys/etc/ntp/keys#Specify the key identifiers which are trusted.#trustedkey 4 8 42#Specify the key identifier to use with the ntpdc utility.#requestkey 8#Specify the key identifier to use with the ntpq utility.#controlkey 8#Enable writing of

12、statistics records.#statistics clockstats cryptostats loopstats peerstats 5.2启动 qdcdh01 上的 ntpd 服务,并设置开机启动:$service ntpd start$chkconfig ntpd on 5.3在集群的其他主机上,修改/etc/ntp.conf文件,修改 server 配置字段内容问qdcdh01 主机,注释红色部分,添加蓝色部分:rootqdcdh00#cat/etc/ntp.conf#For more information about this file,see the man page

13、s#ntp.conf(5),ntp_acc(5),ntp_auth(5),ntp_clock(5),ntp_misc(5),ntp_mon(5).driftfile/var/lib/ntp/drift#Permit time synchronization with our time source,but do not#permit the source to query or modify the service on this system.restrict default kod nomodify notrap nopeer noquery restrict-6 default kod

14、nomodify notrap nopeer noquery#Permit all access over the loopback interface.This could#be tightened as well,but to do so would effect some of#the administrative functions.restrict 127.0.0.1 restrict-6:1#Hosts on local network are less restricted.#restrict 192.168.1.0 mask 255.255.255.0 nomodify not

15、rap#Use public servers from the pool.ntp.org project.#Please consider joining the pool(http:/www.pool.ntp.org/join.html).#server 0.centos.pool.ntp.org iburst#server 1.centos.pool.ntp.org iburst#server 2.centos.pool.ntp.org iburst#server 3.centos.pool.ntp.org iburst server #broadcast 192.168.1.255 au

16、tokey#broadcast server#broadcastclient#broadcast client#broadcast 224.0.1.1 autokey#multicast server#multicastclient 224.0.1.1#multicast client#manycastserver 239.255.254.254#manycast server#manycastclient 239.255.254.254 autokey#manycast client#Enable public key cryptography.#crypto includefile/etc

17、/ntp/crypto/pw#Key file containing the keys and key identifiers used when operating#with symmetric key cryptography.keys/etc/ntp/keys#Specify the key identifiers which are trusted.#trustedkey 4 8 42#Specify the key identifier to use with the ntpdc utility.#requestkey 8#Specify the key identifier to

18、use with the ntpq utility.#controlkey 8#Enable writing of statistics records.#statistics clockstats cryptostats loopstats peerstats 5.4如 5.2 操作,重启各主机的 ntpd 服务,并添加开机启动。6.CDH本地 yum源搭建 6.1在 qdcdh01 主机上安装 httpd服务,并将本次安装的 cdh5.12 相关安装文件放到/var/www/html 下:$yum install httpd 6.2在集群的各主机/etc/yum.repos.d 下添加自建

19、的 cdh_5.12.repo 文件:cm_5.12 name=cloudera manager 5.12.1 baseurl=http:/qdcdh01/cdh_5.12_files/cm_5.12.1 gpgcheck=0 mysql_5.7 name=mysql 5.7 baseurl=http:/qdcdh01/cdh_5.12_files/other_rpms/mysql_5.7 gpgcheck=0 cdh_other_paks name=cdh other packages baseurl=http:/qdcdh01/cdh_5.12_files/other_rpms/other

20、_deps gpgcheck=0 6.3检查 yum源中是否存在 cdh5.12 的相关包:7.MySQL 主从安装配置 7.1在 qdcdh01 和 qdcdh00 上安装 MySQL,其中 qdcdh01 为 master,qdcdh00 为slave;7.2卸载系统中原先安装的 mysql-libs:$rpm-e mysql-libs-nodeps 7.3在 qdcdh01 上安装 MySQL server:$yum install mysql mysql-server mysql-community-libs-compat 7.4初始化 MySQL数据库:$mysqld-user=my

21、sql-datadir=/var/lib/mysql-initialize 7.5创建 MySQL日志目录:$mkdir/var/log/mysql$chown mysql:mysql-R/var/log/mysql 7.6修改配置文件/etc/f:rootqdcdh01 yum.repos.d#cat/etc/f#For advice on how to change settings please see#http:/ mysqld#Remove leading#and set to the amount of RAM for the most important data#cache i

22、n MySQL.Start at 70%of total RAM for dedicated server,else 10%.#innodb_buffer_pool_size=128M#Remove leading#to turn on a very important data integrity option:logging#changes to the binary log between backups.#log_bin#Remove leading#to set options mainly useful for reporting servers.#The server defau

23、lts are faster for transactions and fast SELECTs.#Adjust sizes as needed,experiment to find the optimal values.#join_buffer_size=128M#sort_buffer_size=2M#read_rnd_buffer_size=2M datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock server-id=38 transaction-isolation=READ-COMMITTED key_buffer_size=

24、32M max_allowed_packet=32M thread_stack=256K thread_cache_size=64 query_cache_limit=8M query_cache_size=64M query_cache_type=1 max_connections=550 log_bin=/var/lib/mysql/mysql_binary_log binlog_format=mixed relay-log=/var/lib/mysql/mysql-relay-bin relay-log-index=/var/lib/mysql/mysql-relay-bin.index

25、 master-info-file=/var/lib/mysql/mysql-master.info relay-log-info-file=/var/lib/mysql/mysql-relay-log.info log-bin=/var/lib/mysql/mysql-bin read_buffer_size=2M read_rnd_buffer_size=16M sort_buffer_size=8M join_buffer_size=8M innodb_file_per_table=1 innodb_flush_log_at_trx_commit=2 innodb_log_buffer_

26、size=64M innodb_buffer_pool_size=4G innodb_thread_concurrency=8 innodb_flush_method=O_DIRECT innodb_log_file_size=512M bind-address=0.0.0.0 default-storage-engine=innodb sql_mode=STRICT_ALL_TABLES#Disabling symbolic-links is recommended to prevent assorted security risks symbolic-links=0 log-error=/

27、var/log/mysqld.log pid-file=/var/run/mysqld/mysqld.pid 7.7启动 MySQL服务,并设置开机启动:$service mysqld start$chkconfig mysqld on 7.8通过 mysql_secure_installation 命令设置 mysql,需要输入的 mysql 初始化密码位于/var/log/mysqld.log 中:$mysql_secure_installation 设置 mysql 密码为Pass_haier,并设置不允许 root 用户远程登录,然后用新密码登录测试:$mysql-uroot-hloc

28、alhost-p 7.9将 mysql-connector-java.jar 放到 Java 共享目录下:$cp mysql-connector-java-5.1.38-bin.jar/usr/share/java/mysql-connector-java.jar 7.10以上步骤同样在 qdcdh00 上操作一遍;7.11在 qdcdh00 和 qdcdh01 两台机器上同步执行如下命令:$mysql-uroot-p 7.12在 master(qdcdh01)上设置用来同步数据的用户 rep、slave 的 host(qdcdh00)及密码repmysql:mysqluse mysql;my

29、sqlGRANT ALL PRIVILEGES ON*.*TO root%IDENTIFIED BY mysql WITH GRANT OPTION;mysqlGRANT REPLICATION SLAVE ON*.*TO IDENTIFIED BY repmysql;mysqlFLUSH TABLES WITH READ LOCK;mysqlSHOW MASTER STATUS;+-+-+-+-+-+|File|Position|Binlog_Do_DB|Binlog_Ignore_DB|Executed_Gtid_Set|+-+-+-+-+-+|mysql-bin.000001|1393|

30、+-+-+-+-+-+1 row in set(0.00 sec)此时 master上不要做任何操作;7.13在 slave(qdcdh00)上设置进行设置 master 的主机名,master 的同步用户名及同步用户密码,以及在 master 上执行的 SHOW MASTER STATUS 的属性:mysqluse mysql;mysqlstop slave;mysqlCHANGE MASTER TO MASTER_HOST=,MASTER_USER=rep,MASTER_PASSWORD=repmysql,mysqlMASTER_LOG_FILE=mysql-bin.000001,MAST

31、ER_LOG_POS=1393;mysqlstart slave;7.14在 master MySQL上进行测试:mysqlUNLOCK TABLES;mysqlcreate database test1;mysqluse test1;mysqlcreate table tb1(id INT(4),text(varchar(10);7.15在 slave mysql 上查看数据库是否同步过去,同步则 MySQL 主从配置完成。8.创建集群各服务的数据库 create database scm default character set utf8;grant all on scm.*to scm

32、%identified by Pass_scm;create database amon default character set utf8;grant all on amon.*to amon%identified by Pass_amon;create database rman default character set utf8;grant all on rman.*to rman%identified by Pass_rman;create database metastore default character set utf8;grant all on metastore.*t

33、o hive%identified by Pass_hive;create database sentry default character set utf8;grant all on sentry.*to sentry%identified by Pass_sentry;create database nav default character set utf8;grant all on nav.*to nav%identified by Pass_nav;create database navms default character set utf8;grant all on navms.*to navms%identified by Pass_navms;create database hue default character set utf8 default collate u

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1