阿里云-云小站(无限量代金券发放中)
【腾讯云】云服务器、云数据库、COS、CDN、短信等热卖云产品特惠抢购

CentOS 7安装CDH6简明文档

244次阅读
没有评论

共计 3667 个字符,预计需要花费 10 分钟才能阅读完成。

1、准备工作

1.1 环境

CentOS7、jdk8、MySQL5.7、Python2.7、CDH61.2 文件下载

1.2.1 cloudmanger 地址

https://archive.cloudera.com/cm6/6.0.0/RedHat7/yum/RPMS/x86_64/ cloudera-manager-agent-6.0.0-530873.el7.x86_64.rpm

cloudera-manager-daemons-6.0.0-530873.el7.x86_64.rpm

cloudera-manager-server-6.0.0-530873.el7.x86_64.rpm

1.2.2 资源下载地址

https://archive.cloudera.com/cdh6/6.0.0/parcels/

CDH-6.0.0-1.cdh6.0.0.p0.537114-el7.parcel

CDH-6.0.0-1.cdh6.0.0.p0.537114-el7.parcel.sha256

manifest.json

2、开始安装

2.1 服务器配置

2.1.1 修改 HOST 和主机名

vim /etc/hosts 修改 host,例如

198.168.12.1 cdh1

192.168.12.2 cdh2

192.168.12.3 cdh3

不能有大写字母和下划线

vim /etc/hostname 修改主机名, 修改完后三台机器分别执行 hostname ***(当前节点的主机名)

2.1.2 配置免密登录

ssh-keygen -t rsa -P ” -f ~/.ssh/id_rsa b、ssh-copy-id 每台服务器地址

2.1.3 关闭防火墙

临时关闭 systemctl stop firewalld

禁止开机启动 systemctl disable firewalld

2.1.4 安装 jdk,配置环境变量

这个大家都会,如果不会可以参考这个教程

https://www.linuxidc.com/Linux/2018-11/155296.htm

2.1.5 其他依赖

每台服务器 yum 安装依赖包:redhat-lsb、portmap、httpd、mod_ssl、openssl-devel、python-psycopg2、MySQL-python、chkconfig、python、chkconfig、bind-utils、libxslt、zlib、sqlite、cyrus-sasl-plain、cyrus-sasl-gssapi、fuse、fuse-libs

2.2 Mysql5.7 安装 (在主节点安装)

2.2.1 安装

wget -i -c http://dev.mysql.com/get/mysql57-community-release-el7-10.noarch.rpm

yum -y install mysql57-community-release-el7-10.noarch.rpm

yum -y install mysql-community-server

启动 systemctl start mysqld.service

查看运行状态 systemctl status mysqld.service

查看初始密码 grep “password” /var/log/mysqld.log

登录后修改密码(尽量复杂一点,太简单了验证不通过,也可以查看如何关闭 mysql 校验规则)ALTER USER ‘root’@’localhost’ IDENTIFIED BY ‘new password’;

卸载 yum 源防止自动更新 yum -y remove mysql57-community-release-el7-10.noarch

安装 MySQL-shared-compat 或 MySQL-shared 软件包 (这是 Cloudera Manager Agent 软件包安装所必需的)yum install MySQL-shared-advanced

2.2.2 创建 CDH 相关数据库

create database scm default character set utf8 default collate utf8_general_ci;

grant all on scm.* to ‘scm’@’%’ identified by ‘password’;

create database amon default character set utf8 default collate utf8_general_ci;

grant all on amon.* to ‘amon’@’%’ identified by ‘password’;

create database rman default character set utf8 default collate utf8_general_ci;

grant all on rman.* to ‘rman’@’%’ identified by ‘password’;

create database hue default character set utf8 default collate utf8_general_ci;

grant all on hue.* to ‘hue’@’%’ identified by ‘password’;

create database metastore default character set utf8 default collate utf8_general_ci;

grant all on metastore.* to ‘hive’@’%’ identified by ‘password’;

create database sentry default character set utf8 default collate utf8_general_ci;

grant all on sentry.* to ‘sentry’@’%’ identified by ‘password’;

create database nav default character set utf8 default collate utf8_general_ci;

grant all on nav.* to ‘nav’@’%’ identified by ‘password’;

create database oozie default character set utf8 default collate utf8_general_ci;

grant all on oozie.* to ‘oozie’@’%’ identified by ‘password’;

2.3 CDH 安装

mkdir /opt/cloudera-manager

将 cloudera-manager-agent-6.0.0-530873.el7.x86_64.rpm、cloudera-manager-daemons-6.0.0-530873.el7.x86_64.rpm、cloudera-manager-server-6.0.0-530873.el7.x86_64.rpm

复制到 /opt/cloudera-manager 文件夹中

按 daemons、server、agent 顺序解压

修改文件 /etc/cloudera-scm-agent/config.ini 中 serverhost 指定 server 节点

下载 mysql-connector-Java-5.1.47.jar 包并复制为 /usr/share/java/mysql-connector-java.jar

在主节点执行

/opt/cloudera/cm/schema/scmpreparedatabase.sh mysql -h 主节点 ip –scm-host 主节点 ip scm scm

mkdir -p /opt/cloudera/parcel-repo

将 CDH-6.0.0-1.cdh6.0.0.p0.537114-el7.parcel、CDH-6.0.0-1.cdh6.0.0.p0.537114-el7.parcel.sha256、manifest.json 复制到 /opt/cloudera/parcel-repo

将 CDH-6.0.0-1.cdh6.0.0.p0.537114-el7.parcel.sha256 重命名为 CDH-6.0.0-1.cdh6.0.0.p0.537114-el7.parcel.sha

在 manifest.json 文件中,找到对应版本的秘钥,复制到 CDH-6.0.0-1.cdh6.0.0.p0.537114-el7.parcel.sha 文件中。

11. 启动 systemctl start cloudera-scm-agent、systemctl start cloudera-scm-server

2.4 集群配置

2.4.1 禁用透明大页面压缩

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

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

2.4.1 分配组件

访问 http://192.168.1.1:7180 开始配置集群组件

因为是先安装集群后编写文档,没有截图就没有详细些。

正文完
星哥玩云-微信公众号
post-qrcode
 0
星锅
版权声明:本站原创文章,由 星锅 于2022-01-21发表,共计3667字。
转载说明:除特殊说明外本站文章皆由CC-4.0协议发布,转载请注明出处。
【腾讯云】推广者专属福利,新客户无门槛领取总价值高达2860元代金券,每种代金券限量500张,先到先得。
阿里云-最新活动爆款每日限量供应
评论(没有评论)
验证码
【腾讯云】云服务器、云数据库、COS、CDN、短信等云产品特惠热卖中