拓扑园

  • O&M
    • Universal部署
    • PHP+VUE+Laravel相关
  • Oracle性能优化
  • Oracle项目案例
    • Oracle近期项目案例(目录)
    • Oracle实战问题解析(目录)
    • Oracle数据库名变更流程(2种方式)
    • Oracle数据库目录更换流程(使用Oracle的clone工具)
    • Oracle数据库迁移方案(目录)
    • 标准化文档系列
  • Oracle基础知识
    • LLL的Oracle培训(分类)
    • LLL的docker培训(分类)
    • 标准化文档系列--(分类)
    • Oracle核心经典分析(分类)
    • 图灵小队----(分类并包含以下文章)
    • --MySQL8.0/Oracle/Memcached/Redis等安装配置于RHEL/OL6/7/8.X系列-运行环境最优配置
    • --PG安装配置于RHEL/9X系列-运行环境最优配置
    • --自动维护任务详解-开启、关闭信息统计收集(统计信息)
    • --图灵小队—Oracle/PostgreSQL下创建一个用户测试表(自行定义数据行)
    • --图灵小队-Oracle存储过程导出表的明细_UTL_FILE(文章)
    • --图灵小队-Oracle数据库删除/卸载操作指南(文章)
    • --图灵小队-Oracle常用性能查询SQL语句(文章)
    • --图灵小队-Oracle数据库上线前检查(文章)
    • --图灵小队-Oracle常用SQL语句(文章)
    • --图灵小队—Linux/Oracle脚本/MySQL合集(持续更新)
    • --图灵小队-Oracle技巧记录(文章)
    • ADG
    • RAC
    • ASM
    • OGG
    • RMAN
    • EXPDP/IMPDP
    • 工厂数据导入导出系列
  • MySQL
    • MySQL数据库规范
    • MySQL项目案例
    • MySQL安装配置
    • MYSQL集群项目
    • MySQL常见处理
    • MySQL-Sysbench专题
    • MySQL-Percona Toolkit专题
  • Linux
    • Shell编程
    • kubernetes
    • docker
    • Linux
    • PHP
    • Nginx
    • haproxy
    • mail
    • 网站
    • 域名
    • 网址收藏
  • 数据中心
    • 新框架系统集合
    • 工作文档
    • EBS数据文件扩容
    • VMware虚拟化
    • EBS系列
    • 大数据
    • SVN
    • zabbix
    • SAP
    • 备份相关
    • FC交换机
    • SVN
  • K-Studing
    • D8-Python学习
    • Oracle/MySQl等面试题
    • LG-MySQL
    • LG-Docker/K8S
    • LG-PostgreSQL
    • LG-ORACLE_BBED
    • LG-ORACLE
    • LG-Elasticsearch(ES)+ELK
    • Oracle-19C-OCP
    • WERN_ORACLE培训
    • redis数据库
    • Nginx培训学习系列
  • 其他
    • 外研英语4年级下册-听力
    • 影视系列
    • 如何使用iTunes软件通过抓包下载旧版本的ios的app
天高任鸟飞
Oracle/MySQL数据库恢复/数据迁移/生产规范报告技术交流:TEL:18562510581(微信同号);加微信入群
  1. 首页
  2. 数据中心
  3. 大数据
  4. 正文

大数据CDH——安装——之DataNode5PRD新增主机记录

2019年8月7日 937点热度 0人点赞 0条评论

目录

  • 一、集群环境信息
  • 二、安装前准备
    • 1.设置/etc/hosts文件(CDH集群内所有主机都要配置)-此处给DataNode5
    • 2.修改主机ulimit配置
    • 3.禁用selinux(CDH集群内所有主机都要配置)
    • 4.关闭防火墙(CDH集群内所有主机都要配置)
    • 5.修改主机参数交换区和透明大页面参数(CDH集群内所有主机都要配置)
    • 6.集群时钟同步(CDH集群内所有主机都要配置)
    • 7.安装httpd(CM主机执行)——新增数据节点无需安装
    • 8.配置内网CM YUM源(CDH集群内所有主机都要配置)
    • 9.安装mariadb——数据节点无需安装
  • 三、CM/CDH安装
    • 1.所有主机安装cm server和jdk
    • 2.mariadb建立cm server元数据库,并赋权给cm用户
    • 3. mariadb建立CM监控组件数据库并赋权
    • 4. mariadb建立CDH组件数据库并赋权
    • 5.初始化CM元数据库(2.68就是mysql数据库,2.48,-2.49)
    • 6.开始扩容CDH

本文档以增加DataNode5PRD为记录。

一、集群环境信息

本次安装集群共7+1台主机,其中一台CM管理节点,2台namonode节点,4+1台datanode节点。具体信息如下:

 

主机名

IP地址

集群角色

主机配置

操作系统版本

BigDataHadoopCMPRD

172.18.2.50

CM  

8C/16G

RHEL   6.9

BigDataHadoopNN1PRD

172.18.2.38

namonode

20C/256G

RHEL   6.9

BigDataHadoopNN2PRD

172.18.2.39

namonode

20C/256G

RHEL   6.9

BigDataHadoopDN1PRD

172.18.2.40

datanode

20C/256G

RHEL   6.9

BigDataHadoopDN2PRD

172.18.2.41

datanode

20C/256G

RHEL   6.9

BigDataHadoopDN3PRD

172.18.2.42

datanode

20C/256G

RHEL   6.9

BigDataHadoopDN4PRD

172.18.2.43

datanode

20C/256G

RHEL   6.9

BigDataHadoopDN5PRD

172.18.2.72

Datanode

20C/256G

RHEL 6.9

二、安装前准备

 0.     准备工作:

     a.网卡绑定配置(测试可以连通新增节点服务器即可)

     b.datanode磁盘配置

#创建硬盘目录
[root@BigDataHadoopDN5PRD /]# for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14
> do 
> mkdir /data${i}
> done

#获取硬盘信息
[root@BigDataHadoopDN5PRD /]# fdisk -l |grep 600 |sort > /root/disks.txt
WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.
WARNING: GPT (GUID Partition Table) detected on '/dev/sdc'! The util fdisk doesn't support GPT. Use GNU Parted.
WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn't support GPT. Use GNU Parted.
WARNING: GPT (GUID Partition Table) detected on '/dev/sdf'! The util fdisk doesn't support GPT. Use GNU Parted.
WARNING: GPT (GUID Partition Table) detected on '/dev/sde'! The util fdisk doesn't support GPT. Use GNU Parted.
WARNING: GPT (GUID Partition Table) detected on '/dev/sdd'! The util fdisk doesn't support GPT. Use GNU Parted.
WARNING: GPT (GUID Partition Table) detected on '/dev/sdg'! The util fdisk doesn't support GPT. Use GNU Parted.
WARNING: GPT (GUID Partition Table) detected on '/dev/sdi'! The util fdisk doesn't support GPT. Use GNU Parted.
WARNING: GPT (GUID Partition Table) detected on '/dev/sdh'! The util fdisk doesn't support GPT. Use GNU Parted.
WARNING: GPT (GUID Partition Table) detected on '/dev/sdj'! The util fdisk doesn't support GPT. Use GNU Parted.
WARNING: GPT (GUID Partition Table) detected on '/dev/sdk'! The util fdisk doesn't support GPT. Use GNU Parted.
WARNING: GPT (GUID Partition Table) detected on '/dev/sdl'! The util fdisk doesn't support GPT. Use GNU Parted.
WARNING: GPT (GUID Partition Table) detected on '/dev/sdm'! The util fdisk doesn't support GPT. Use GNU Parted.
WARNING: GPT (GUID Partition Table) detected on '/dev/sdo'! The util fdisk doesn't support GPT. Use GNU Parted.
WARNING: GPT (GUID Partition Table) detected on '/dev/sdn'! The util fdisk doesn't support GPT. Use GNU Parted.

[root@BigDataHadoopDN5PRD /]# cat /root/disks.txt 
Disk /dev/sdb: 6001.2 GB, 6001175126016 bytes
Disk /dev/sdc: 6001.2 GB, 6001175126016 bytes
Disk /dev/sdd: 6001.2 GB, 6001175126016 bytes
Disk /dev/sde: 6001.2 GB, 6001175126016 bytes
Disk /dev/sdf: 6001.2 GB, 6001175126016 bytes
Disk /dev/sdg: 6001.2 GB, 6001175126016 bytes
Disk /dev/sdh: 6001.2 GB, 6001175126016 bytes
Disk /dev/sdi: 6001.2 GB, 6001175126016 bytes
Disk /dev/sdj: 6001.2 GB, 6001175126016 bytes
Disk /dev/sdk: 6001.2 GB, 6001175126016 bytes
Disk /dev/sdl: 6001.2 GB, 6001175126016 bytes
Disk /dev/sdm: 6001.2 GB, 6001175126016 bytes
Disk /dev/sdn: 6001.2 GB, 6001175126016 bytes
Disk /dev/sdo: 6001.2 GB, 6001175126016 bytes



#格式化硬盘:
for diskname in $(awk -F":" '{print $1}' /root/disks.txt|awk '{print $2}')
do
parted -s ${diskname} mklabel gpt
parted -s ${diskname} mkpart primary ext2 0 100%
mkfs.ext4 ${diskname}1
done
#每次格式化都需要20-30分钟,格式化一块6T的盘

[root@BigDataHadoopDN5PRD /]# for diskname in $(awk -F":" '{print $1}' /root/disks.txt|awk '{print $2}')
> do
> parted -s ${diskname} mklabel gpt
> parted -s ${diskname} mkpart primary ext2 0 100%
> mkfs.ext4 ${diskname}1
> done
Warning: The resulting partition is not properly aligned for best performance.
mke2fs 1.41.12 (17-May-2010)
/dev/sdb1 alignment is offset by 3072 bytes.
This may result in very poor performance, (re)-partitioning suggested.
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=1 blocks, Stripe width=0 blocks
366288896 inodes, 1465130637 blocks
73256531 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
44713 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks: 
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 
        4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968, 
        102400000, 214990848, 512000000, 550731776, 644972544

Writing inode tables: done                            
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: 
done

This filesystem will be automatically checked every 28 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
Warning: The resulting partition is not properly aligned for best performance.
mke2fs 1.41.12 (17-May-2010)
/dev/sdc1 alignment is offset by 3072 bytes.
This may result in very poor performance, (re)-partitioning suggested.
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=1 blocks, Stripe width=0 blocks
366288896 inodes, 1465130637 blocks
73256531 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
44713 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks: 
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 
        4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968, 
        102400000, 214990848, 512000000, 550731776, 644972544

Writing inode tables: done                            
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: 
done

This filesystem will be automatically checked every 30 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
Warning: The resulting partition is not properly aligned for best performance.
mke2fs 1.41.12 (17-May-2010)
/dev/sdd1 alignment is offset by 3072 bytes.
This may result in very poor performance, (re)-partitioning suggested.
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=1 blocks, Stripe width=0 blocks
366288896 inodes, 1465130637 blocks
73256531 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
44713 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks: 
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 
        4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968, 
        102400000, 214990848, 512000000, 550731776, 644972544

Writing inode tables: done                            
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: 
done

This filesystem will be automatically checked every 24 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
Warning: The resulting partition is not properly aligned for best performance.
mke2fs 1.41.12 (17-May-2010)
/dev/sde1 alignment is offset by 3072 bytes.
This may result in very poor performance, (re)-partitioning suggested.
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=1 blocks, Stripe width=0 blocks
366288896 inodes, 1465130637 blocks
73256531 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
44713 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks: 
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 
        4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968, 
        102400000, 214990848, 512000000, 550731776, 644972544

Writing inode tables: done                            
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: 
done

This filesystem will be automatically checked every 32 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
Warning: The resulting partition is not properly aligned for best performance.
mke2fs 1.41.12 (17-May-2010)
/dev/sdf1 alignment is offset by 3072 bytes.
This may result in very poor performance, (re)-partitioning suggested.
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=1 blocks, Stripe width=0 blocks
366288896 inodes, 1465130637 blocks
73256531 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
44713 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks: 
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 
        4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968, 
        102400000, 214990848, 512000000, 550731776, 644972544

Writing inode tables: done                            
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 26 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
Warning: The resulting partition is not properly aligned for best performance.
mke2fs 1.41.12 (17-May-2010)
/dev/sdg1 alignment is offset by 3072 bytes.
This may result in very poor performance, (re)-partitioning suggested.
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=1 blocks, Stripe width=0 blocks
366288896 inodes, 1465130637 blocks
73256531 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
44713 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks: 
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 
        4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968, 
        102400000, 214990848, 512000000, 550731776, 644972544

Writing inode tables: done                            
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: 
done

This filesystem will be automatically checked every 20 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
Warning: The resulting partition is not properly aligned for best performance.
mke2fs 1.41.12 (17-May-2010)
/dev/sdh1 alignment is offset by 3072 bytes.
This may result in very poor performance, (re)-partitioning suggested.
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=1 blocks, Stripe width=0 blocks
366288896 inodes, 1465130637 blocks
73256531 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
44713 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks: 
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 
        4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968, 
        102400000, 214990848, 512000000, 550731776, 644972544

Writing inode tables: done                            
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: 
done

This filesystem will be automatically checked every 21 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
Warning: The resulting partition is not properly aligned for best performance.
mke2fs 1.41.12 (17-May-2010)
/dev/sdi1 alignment is offset by 3072 bytes.
This may result in very poor performance, (re)-partitioning suggested.
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=1 blocks, Stripe width=0 blocks
366288896 inodes, 1465130637 blocks
73256531 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
44713 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks: 
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 
        4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968, 
        102400000, 214990848, 512000000, 550731776, 644972544

Writing inode tables: done                            
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: 
done

This filesystem will be automatically checked every 26 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
Warning: The resulting partition is not properly aligned for best performance.
mke2fs 1.41.12 (17-May-2010)
/dev/sdj1 alignment is offset by 3072 bytes.
This may result in very poor performance, (re)-partitioning suggested.
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=1 blocks, Stripe width=0 blocks
366288896 inodes, 1465130637 blocks
73256531 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
44713 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks: 
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 
        4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968, 
        102400000, 214990848, 512000000, 550731776, 644972544

Writing inode tables: done                            
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: 
done

This filesystem will be automatically checked every 23 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
Warning: The resulting partition is not properly aligned for best performance.
mke2fs 1.41.12 (17-May-2010)
/dev/sdk1 alignment is offset by 3072 bytes.
This may result in very poor performance, (re)-partitioning suggested.
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=1 blocks, Stripe width=0 blocks
366288896 inodes, 1465130637 blocks
73256531 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
44713 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks: 
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 
        4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968, 
        102400000, 214990848, 512000000, 550731776, 644972544

Writing inode tables: done                            
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: 
done

This filesystem will be automatically checked every 33 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
Warning: The resulting partition is not properly aligned for best performance.
mke2fs 1.41.12 (17-May-2010)
/dev/sdl1 alignment is offset by 3072 bytes.
This may result in very poor performance, (re)-partitioning suggested.
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=1 blocks, Stripe width=0 blocks
366288896 inodes, 1465130637 blocks
73256531 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
44713 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks: 
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 
        4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968, 
        102400000, 214990848, 512000000, 550731776, 644972544

Writing inode tables: done                            
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: 
done

This filesystem will be automatically checked every 25 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
Warning: The resulting partition is not properly aligned for best performance.
mke2fs 1.41.12 (17-May-2010)
/dev/sdm1 alignment is offset by 3072 bytes.
This may result in very poor performance, (re)-partitioning suggested.
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=1 blocks, Stripe width=0 blocks
366288896 inodes, 1465130637 blocks
73256531 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
44713 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks: 
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 
        4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968, 
        102400000, 214990848, 512000000, 550731776, 644972544

Writing inode tables: done                            
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: 
done

This filesystem will be automatically checked every 38 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
Warning: The resulting partition is not properly aligned for best performance.
mke2fs 1.41.12 (17-May-2010)
/dev/sdn1 alignment is offset by 3072 bytes.
This may result in very poor performance, (re)-partitioning suggested.
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=1 blocks, Stripe width=0 blocks
366288896 inodes, 1465130637 blocks
73256531 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
44713 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks: 
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 
        4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968, 
        102400000, 214990848, 512000000, 550731776, 644972544

Writing inode tables: done                            
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 30 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
Warning: The resulting partition is not properly aligned for best performance.
mke2fs 1.41.12 (17-May-2010)
/dev/sdo1 alignment is offset by 3072 bytes.
This may result in very poor performance, (re)-partitioning suggested.
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=1 blocks, Stripe width=0 blocks
366288896 inodes, 1465130637 blocks
73256531 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
44713 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks: 
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 
        4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968, 
        102400000, 214990848, 512000000, 550731776, 644972544

Writing inode tables: done                            
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 38 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.


挂载硬盘:
(1)手动挂载:
mount /dev/sdb1 /data1    
mount /dev/sdc1 /data2    
mount /dev/sdd1 /data3    
mount /dev/sde1 /data4    
mount /dev/sdf1 /data5    
mount /dev/sdg1 /data6    
mount /dev/sdh1 /data7    
mount /dev/sdi1 /data8    
mount /dev/sdj1 /data9    
mount /dev/sdk1 /data10    
mount /dev/sdl1 /data11    
mount /dev/sdm1 /data12    
mount /dev/sdn1 /data13    
mount /dev/sdo1 /data14    
(2)开机自动挂载:
备份:  cp /etc/fstab /etc/fstab.bak_$(date +%Y%m%d)

cat >> /etc/fstab <<EOF
/dev/sdb1 /data1 ext4 defaults 0 0
/dev/sdc1 /data2 ext4 defaults 0 0
/dev/sdd1 /data3 ext4 defaults 0 0
/dev/sde1 /data4 ext4 defaults 0 0
/dev/sdf1 /data5 ext4 defaults 0 0
/dev/sdg1 /data6 ext4 defaults 0 0
/dev/sdh1 /data7 ext4 defaults 0 0
/dev/sdi1 /data8 ext4 defaults 0 0
/dev/sdj1 /data9 ext4 defaults 0 0
/dev/sdk1 /data10 ext4 defaults 0 0
/dev/sdl1 /data11 ext4 defaults 0 0
/dev/sdm1 /data12 ext4 defaults 0 0
/dev/sdn1 /data13 ext4 defaults 0 0
/dev/sdo1 /data14 ext4 defaults 0 0
EOF

image.png

1.设置/etc/hosts文件(CDH集群内所有主机都要配置)-此处给DataNode5

备份配置文件:

[root@BigDataHadoopDN5PRD ~]# cp /etc/hosts /etc/hosts.bak_$(date +%Y%m%d)

修改:

[root@BigDataHadoopDN5PRD ~]# cat >> /etc/hosts <<EOF
172.18.2.50 BigDataHadoopCMPRD
172.18.2.38 BigDataHadoopNN1PRD
172.18.2.39 BigDataHadoopNN2PRD
172.18.2.40 BigDataHadoopDN1PRD
172.18.2.41 BigDataHadoopDN2PRD
172.18.2.42 BigDataHadoopDN3PRD
172.18.2.43 BigDataHadoopDN4PRD
172.18.2.72 BigDataHadoopDN5PRD
EOF

其他CM机和CDH主机需要增加:

[root@BigDataHadoopDN5PRD ~]# cat >> /etc/hosts <<EOF
172.18.2.72 BigDataHadoopDN5PRD
EOF

2.修改主机ulimit配置

备份配置文件:cp /etc/security/limits.conf /etc/security/limits.conf_$(date +%Y%m%d)

修改:

[root@BigDataHadoopDN5PRD ~]# cat >>  /etc/security/limits.conf <<EOF
########### limits for Hadoop #############
*         soft    nproc   131072
*         hard    nproc   131072
*         soft    nofile  655360
*         hard    nofile  655360
########### limits for Hadoop #############
EOF

3.禁用selinux(CDH集群内所有主机都要配置)

即时禁用:setenforce 0

开机禁用:修改/etc/selinux/config文件,SELINUX值为disabled

备份配置文件:cp /etc/selinux/config /etc/selinux/config_$(date +%Y%m%d)

修改:

sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config

4.关闭防火墙(CDH集群内所有主机都要配置)

即时关闭:

service iptables stop

service ip6tables stop

开机关闭:

chkconfig iptables off

chkconfig ip6tables off

5.修改主机参数交换区和透明大页面参数(CDH集群内所有主机都要配置)

(1)配置即时生效:

[root@BigDataHadoopDN5PRD ~]# echo 0 > /proc/sys/vm/swappiness
[root@BigDataHadoopDN5PRD ~]# echo never > /sys/kernel/mm/transparent_hugepage/defrag
[root@BigDataHadoopDN5PRD ~]# echo never > /sys/kernel/mm/transparent_hugepage/enabled

(2)配置重启生效:

    修改/etc/sysctl.conf文件:vm.swappiness=0

    备份配置文件:cp /etc/sysctl.conf /etc/sysctl.conf_$(date +%Y%m%d)

    修改

[root@BigDataHadoopDN5PRD ~]# cat >>  /etc/sysctl.conf<<EOF
vm.swappiness=0
EOF

(3)修改/etc/rc.d/rc.local文件,

备份配置文件:cp /etc/rc.d/rc.local /etc/rc.d/rc.local_$(date +%Y%m%d)

(4)配置文件增加以下内容:

[root@BigDataHadoopDN5PRD ~]# echo never > /sys/kernel/mm/transparent_hugepage/defrag
[root@BigDataHadoopDN5PRD ~]# echo never > /sys/kernel/mm/transparent_hugepage/enabled

(5)修改配置文件:

[root@BigDataHadoopDN5PRD ~]# cat >> /etc/rc.d/rc.local <<EOF
echo never > /sys/kernel/mm/transparent_hugepage/defrag
echo never > /sys/kernel/mm/transparent_hugepage/enabled
EOF

6.集群时钟同步(CDH集群内所有主机都要配置)

配置时间同步服务器

(1)修改/etc/ntp.conf文件(先备份:cp /etc/ntp.conf /etc/ntp.conf_$(date +%Y%m%d))

    vim /etc/ntp.conf增加配置:server 172.18.1.254 iburst

(2)修改/etc/sysconfig/ntpdate文件,SYNC_HWCLOCK=yes

    备份配置文件:cp /etc/sysconfig/ntpdate /etc/sysconfig/ntpdate_$(date +%Y%m%d)

    修改:sed -i 's/SYNC_HWCLOCK=no/SYNC_HWCLOCK=yes/' /etc/sysconfig/ntpdate

(3)启动ntpd服务:service ntpd start

7.安装httpd(CM主机执行)——新增数据节点无需安装

8.配置内网CM YUM源(CDH集群内所有主机都要配置)

[root@BigDataHadoopDN5PRD ~]# cat > /etc/yum.repos.d/cm.repo << EOF
[CM]
name=CM
baseurl=http://172.18.2.50/CM/cm/5.14.2/
gpgcheck=0
enabled=1
EOF
或
[root@BigDataHadoopDN5PRD ~]# cat > /etc/yum.repos.d/cloudera-manager.repo << EOF
[cloudera-manager]
name = Cloudera Manager, Version 5.14.2
baseurl = http://172.18.2.50/CM/cm/5.14.2/
gpgcheck = 0
EOF
同时加入如下源:
[root@BigDataHadoopNN1PRD ~]# cat /etc/yum.repos.d/iso.repo 
[rhel-source]
name=Red Hat Enterprise Linux $releasever - $basearch - Source
baseurl=http://172.18.2.48/iso
enabled=1
gpgcheck=0

9.安装mariadb——数据节点无需安装

10.安装mysql connect jdbc jar包(所有主机都要安装)

[root@BigDataHadoopDN5PRD ~]# mkdir -p /usr/share/java
#上传mysql-connector-java-5.1.42-bin.jar 到 /usr/share/java目录
[root@BigDataHadoopDN5PRD ~]# ln -sv /usr/share/java/mysql-connector-java-5.1.42-bin.jar /usr/share/java/mysql-connector-java.jar

三、CM/CDH安装

1.所有主机安装cm server和jdk

创建目录:mkdir -p /usr/java

上传jdk-8u121-linux-x64.tar到/usr/java目录

解压:tar xvf jdk-8u121-linux-x64.tar


配置jdk目录

cp /etc/profile /etc/profile.bak_$(date +%Y%m%d)

vi /etc/profile

增加下面内容

export JAVA_HOME=/usr/java/jdk1.8.0_121

export JRE_HOME=$JAVA_HOME/jre

export PATH=$JAVA_HOME/bin:$PATH


2.mariadb建立cm server元数据库,并赋权给cm用户

3. mariadb建立CM监控组件数据库并赋权

4. mariadb建立CDH组件数据库并赋权

5.初始化CM元数据库(2.68就是mysql数据库,2.48,-2.49)

6.开始扩容CDH

6.1 登录cm,选择主机->向集群添加主机。

image.png

6.1 Cm Agent安装选择自定义储存库,地址输入:http://172.18.2.50/CM/cm/5.14.2

image.png

image.pngimage.png

image.png

image.png

image.png

image.png

image.png

image.png

image.png

image.png

image.png

image.png

image.png

image.png

image.png

image.png

image.png

image.png

6.8 给主机添加角色,HDFS加上一个角色实例

image.png

image.png查看DataNode4的角色实例,有如下组件:

image.png

DataNode5也按照此数量进行安装

image.png

image.png

image.png

image.png

image.png

image.png

6.9 启动各服务,以及重启过期配置服务

image.png

image.png

image.png

6.11 数据平衡

执行完服务启动后,进行数据平衡

image.png

等待结果

HDFS容量:

image.png

YARN资源池扩展

image.png

创建完后,如果未启动新节点的各组件,可能会出现如下过期警告配置,解决方法:重启集群,进行自动配置。

image.png

问题解决:

image.png

image.png

根据查看:

BEGIN yum list installed cloudera-manager-agent 

Loaded plugins: product-id, refresh-packagekit, search-disabled-repos, security, 

: subscription-manager 

This system is not registered with an entitlement server. You can use subscription-manager to register. 

Error: No matching Packages to list 

END (1) 

(1)错误提示:

    redhat替换yum源时redhat.repo无法删除或禁用的问题提示:This system is not registered with an entitlement server.You can use subscription-manager to register.

(2)问题描述:

    新装6.9,在替换自带的repo源时发现无论是将redhat.repo重命名还是删除,在执行yum命令后总是自动又生成redhat.repo得问题,导致替换的CentOS-Base.repo,一直无法使用的。

(3)问题现象:

    这个redhat.repo一直无法删除,执行yum命令后又会出现,如果你在redhat.repo中写了enabled=0,在执行yum命令后,最终会保留你的注释行,而数据行enabled=0会被删掉。

(4)问题所在:

    经过查找,发现是redhat自带的插件subscription-manager给弄得的。而这个插件的作用就是Red Hat Subscription Manager订阅管理器,就是它让你一直register

(5)问题解决:

    找到subscription-manage的配置文件:/etc/yum/pluginconf.d/subscription-manager.conf

    将enabled=1改为enabled=0

附:转:

subscription-manager订阅管理器

脚本文件: /usr/lib/yum-plugins/subscription-manager.py

配置文件: /etc/yum/pluginconf.d/subscription-manager.conf

调用了脚本 /usr/share/rhsm/repolib.py 

去重写或者更新/etc/yum.repos.d/redhat.repo文件。

每次yum调用(不禁掉plugins的情况下),都会更新此文件。

因此,为了不冲突,可以如下操作:

第一:重命名自己的repo文件,比如RHEL.repo

第二:停止掉该插件的使用,在配置文件中把enable=0即可。

为了不影响系统自带功能,建议选取第一种方法,另外,该现象好像只是rhel6系统存在,4和5没有发现。

image.png

本作品采用 知识共享署名 4.0 国际许可协议 进行许可
标签: 暂无
最后更新:2019年8月15日

admin

这个人很懒,什么都没留下

打赏 点赞
< 上一篇
下一篇 >

文章评论

您需要 登录 之后才可以评论

COPYRIGHT © 2022 拓扑园. ALL RIGHTS RESERVED.

Theme Kratos Made By Seaton Jiang

鲁ICP备2021020523号

鲁ICP备2021020523号