0002-CENTOS7.2安装CDH5.10和Kudu1.2(一)

简介: 1 概述 本文档描述CENTOS7.2操作系统部署CDH企业版的过程。Cloudera企业级数据中心的安装主要分为4个步骤: 1.集群服务器配置,包括安装操作系统、关闭防火墙、同步服务器时钟等; 2.外部数据库安装 3.安装Cloudera管理器; 4.安装CDH集群; 集群完整性检查,包括HDFS文件系统、MapReduce、Hive等是否可以正常运行。

1 概述

本文档描述CENTOS7.2操作系统部署CDH企业版的过程。Cloudera企业级数据中心的安装主要分为4个步骤:

1.集群服务器配置,包括安装操作系统、关闭防火墙、同步服务器时钟等;

2.外部数据库安装

3.安装Cloudera管理器;

4.安装CDH集群;

  1. 集群完整性检查,包括HDFS文件系统、MapReduce、Hive等是否可以正常运行。

这篇文档将着重介绍Cloudera管理器与CDH的安装,并基于以下假设:

  1. 操作系统版本:CENTOS7.2
  2. MariaDB数据库版本为10.2.1
  3. CM版本:CDH 5.10.0
  4. CDH版本:CDH 5.10.0

5.采用ec2-user对集群进行部署

6.您已经下载CDH和CM的安装包

2 前期准备

2.1 hostname及hosts配置

集群中各个节点之间能互相通信使用静态IP地址。IP地址和主机名通过/etc/hosts配置,主机名/etc/hostname进行配置。

以cm节点(172.31.2.159)为例:

  • hostname配置

/etc/hostname文件如下:

| ip-172-31-2-159 |

或者你可以通过命令修改立即生效

| ec2-user@ip-172-31-2-159 ~$ sudo hostnamectl set-hostname ip-172-31-2-159 |

注意:这里修改hostname跟REDHAT6的区别

  • hosts配置

/etc/hosts文件如下:

| 172.31.2.159 ip-172-31-2-159172.31.12.108 ip-172-31-12-108172.31.5.236 ip-172-31-5-236172.31.7.96 ip-172-31-7-96 |

以上两步操作,在集群中其它节点做相应配置。

2.2 禁用SELinux

在所有节点执行sudo setenforce 0 命令,此处使用批处理shell执行:

| ec2-user@ip-172-31-2-159 ~$ sh ssh_do_all.sh node.list "sudo setenforce 0" |

集群所有节点修改/etc/selinux/config文件如下:

| SELINUX=disabledSELINUXTYPE=targeted |

2.3 关闭防火墙

集群所有节点执行 sudo systemctl stop命令,此处通过shell批量执行命令如下:

2.4 集群时钟同步

在CentOS7.2的操作系统上,已经默认的安装了chrony,配置chrony时钟同步,将cm(172.31.2.159)服务作为本地chrony服务器,其它3台服务器与其保持同步,配置片段:

  • 172.31.2.159配置与自己同步

  • 集群其它节点:在注释下增加如下配置

  • 重启所有机器的chrony服务

| ec2-user@ip-172-31-2-159 ~$ sh ssh_do_all.sh node.list "sudo systemctl restart chronyd" |

  • 验证始终同步,在所有节点执行chronycsources命令,如下使用脚本批量执行

| ec2-user@ip-172-31-2-159 ~$ sh ssh_do_all.sh node.list "chronyc sources" |

2.5 配置操作系统repo

  • 挂载操作系统iso文件

  • 配置操作系统repo

2.6 安装http服务

  • 安装httpd服务

| ec2-user@ip-172-31-2-159 ~$ sudo yum -y install httpd |

  • 启动或停止httpd服务

| ec2-user@ip-172-31-2-159 ~$ sudo systemctl start httpdec2-user@ip-172-31-2-159 ~$ sudo systemctl stop httpd |

  • 安装完httpd后,重新制作操作系统repo,换成http的方式方便其它服务器也可以访问

2.7 安装MariaDB

    MariaDB-10.2.1-centos7-x86\_64-client.rpm
    MariaDB-10.2.1-centos7-x86\_64-common.rpm
    MariaDB-10.2.1-centos7-x86\_64-compat.rpm
    MariaDB-10.2.1-centos7-x86\_64-server.rpm

将包下载到本地,放在同一目录,执行createrepo命令生成rpm元数据。

此处使用apache2,将上述mariadb10.2.1目录移动到/var/www/html目录下, 使得用户可以通过HTTP访问这些rpm包。

  • 启动并配置MariaDB
[ec2-user@ip-172-31-2-159 ~]$ sudo systemctl  start mariadb

[ec2-user@ip-172-31-2-159 ~]$ sudo /usr/bin/mysql_secure_installation

 

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS  RECOMMENDED FOR ALL MariaDB

       SERVERS 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

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 fo

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 fa

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!
  • 建立CM和Hive需要的表

  • 安装jdbc驱动

3 Cloudera Manager安装

3.1 配置本地repo源

将Cloudera Manager安装需要的7个rpm包下载到本地,放在同一目录,执行createrepo命令生成rpm元数据。

  • 配置Web服务器

此处使用apache2,将上述cdh5.10.0/cm5.10.0目录移动到/var/www/html目录下, 使得用户可以通过HTTP访问这些rpm包。

| ec2-user@ip-172-31-2-159 ~$ sudo mv cdh5.10.0/ cm5.10.0/ /var/www/html/ |

3.2 安装Cloudera Manager Server

  • 通过yum安装ClouderaManager Server

| ec2-user@ip-172-31-2-159 ~$ sudo yum -y install cloudera-manager-server |

  • 初始化数据库

  • 启动ClouderaManager Server

| ec2-user@ip-172-31-2-159 ~$ sudo systemctl start cloudera-scm-server |

  • 检查端口是否监听

| ec2-user@ip-172-31-2-159 ~$ sudo netstat -lnpt | grep 7180tcp 0 0 0.0.0.0:7180 0.0.0.0:* LISTEN 6890/java |

4 CDH安装

4.1 CDH集群安装向导

  1. admin/admin登录到CM
  2. 同意license协议,点击继续

3.选择60试用,点击继续

4.点击“继续”

5.输入主机ip或者名称,点击搜索找到主机后点击继续

6.点击“继续”

7.使用parcel选择,点击“更多选项”,点击“-”删除其它所有地址,输入

http://172.31.2.159/cm5.10.0/点击“保存更改”

8.选择自定义存储库,输入cm的http地址

9.点击“继续”,进入下一步安装jdk

10.点击“继续”,进入下一步,默认多用户模式

11.点击“继续”,进入下一步配置ssh账号密码

12.点击“继续”,进入下一步,安装Cloudera Manager相关到各个节点

13.点击“继续”,进入下一步安装cdh到各个节点

14.点击“继续”,进入下一步主机检查,确保所有检查项均通过

点击完成进入服务安装向导。

4.2 集群设置安装向导

  1. 选择需要安装的服务

2.点击“继续”,进入集群角色分配

3.点击“继续”,进入下一步,测试数据库连接

4.测试成功,点击“继续”,进入目录设置,此处使用默认默认目录,根据实际情况进行目录修改

5.点击“继续”,进入各个服务启动

6.安装成功

7.安装成功后进入home管理界面

相关文章
|
5天前
|
缓存 Ubuntu Linux
Linux中yum、rpm、apt-get、wget的区别,yum、rpm、apt-get常用命令,CentOS、Ubuntu中安装wget
通过本文,我们详细了解了 `yum`、`rpm`、`apt-get`和 `wget`的区别、常用命令以及在CentOS和Ubuntu中安装 `wget`的方法。`yum`和 `apt-get`是高层次的包管理器,分别用于RPM系和Debian系发行版,能够自动解决依赖问题;而 `rpm`是低层次的包管理工具,适合处理单个包;`wget`则是一个功能强大的下载工具,适用于各种下载任务。在实际使用中,根据系统类型和任务需求选择合适的工具,可以大大提高工作效率和系统管理的便利性。
54 25
|
15天前
|
监控 Linux PHP
【02】客户端服务端C语言-go语言-web端PHP语言整合内容发布-优雅草网络设备监控系统-2月12日优雅草简化Centos stream8安装zabbix7教程-本搭建教程非docker搭建教程-优雅草solution
【02】客户端服务端C语言-go语言-web端PHP语言整合内容发布-优雅草网络设备监控系统-2月12日优雅草简化Centos stream8安装zabbix7教程-本搭建教程非docker搭建教程-优雅草solution
65 20
|
1月前
|
存储 分布式计算 Hadoop
Centos7.9安装kerberos
Centos7.9安装kerberos
86 25
|
1月前
|
存储 Shell 网络安全
Centos7.9安装openldap
Centos7.9安装openldap
58 16
|
1月前
|
数据可视化 Linux 应用服务中间件
Centos7.9安装phpldapadmin
Centos7.9安装phpldapadmin
62 15
|
1月前
|
网络协议 Java 应用服务中间件
centos7环境下tomcat8的安装与配置
本文介绍了在Linux环境下安装和配置Tomcat 8的详细步骤。首先,通过无网络条件下的文件交互软件(如Xftp 6或MobaXterm)下载并解压Tomcat安装包至指定路径,启动Tomcat服务并测试访问。接着,修改Tomcat端口号以避免冲突,并部署Java Web应用项目至Tomcat服务器。最后,调整Linux防火墙规则,确保外部可以正常访问部署的应用。关键步骤包括关闭或配置防火墙、添加必要的端口规则,确保Tomcat服务稳定运行。
|
3月前
|
SQL 存储 Linux
从配置源到数据库初始化一步步教你在CentOS 7.9上安装SQL Server 2019
【11月更文挑战第16天】本文介绍了在 CentOS 7.9 上安装 SQL Server 2019 的详细步骤,包括配置系统源、安装 SQL Server 2019 软件包以及数据库初始化,确保 SQL Server 正常运行。
168 4
|
3月前
|
SQL 存储 Linux
从配置源到数据库初始化一步步教你在CentOS 7.9上安装SQL Server 2019
【11月更文挑战第8天】本文介绍了在 CentOS 7.9 上安装 SQL Server 2019 的详细步骤,包括系统准备、配置安装源、安装 SQL Server 软件包、运行安装程序、初始化数据库以及配置远程连接。通过这些步骤,您可以顺利地在 CentOS 系统上部署和使用 SQL Server 2019。
178 1
|
3月前
|
SQL 存储 Linux
从配置源到数据库初始化一步步教你在CentOS 7.9上安装SQL Server 2019
【11月更文挑战第7天】本文介绍了在 CentOS 7.9 上安装 SQL Server 2019 的详细步骤,包括系统要求检查与准备、配置安装源、安装 SQL Server 2019、配置 SQL Server 以及数据库初始化(可选)。通过这些步骤,你可以成功安装并初步配置 SQL Server 2019,进行简单的数据库操作。
108 1
|
3月前
|
存储 安全 Linux
VMware安装CentOS7
【11月更文挑战第11天】本文详细介绍了在 VMware 中安装 CentOS 7 的步骤,包括准备工作、创建虚拟机、配置虚拟机硬件和安装 CentOS 7。具体步骤涵盖下载 CentOS 7 镜像文件、安装 VMware 软件、创建和配置虚拟机硬件、启动虚拟机并进行安装设置,最终完成 CentOS 7 的安装。在安装过程中,需注意合理设置磁盘分区、软件选择和网络配置,以确保系统的性能和功能满足需求。
429 0

热门文章

最新文章