大数据基础设施搭建 - Doris

一、Linux系统要求

1.1 设置系统最大打开文件句柄数

注意这里的*不要去掉

[hadoop@hadoop102 ~]$ sudo vim /etc/security/limits.conf

内容:

* soft nofile 65536
* hard nofile 131072
* soft nproc 131072
* hard nproc 131072

1.2 设置最大虚拟块的大小

[hadoop@hadoop102 ~]$ sudo vim /etc/sysctl.conf

新增内容:

vm.max_map_count=2000000

1.3 集群中其他安装doris的机器同上调整

1.4 重启服务器生效

二、确认需要下载哪个Doris版本

下载地址:https://doris.apache.org/download/
执行下列命令,能查出记录的下载avx2版本,否则下载noavx2版本

cat /proc/cpuinfo | grep avx2

三、上传并解压压缩包

3.1 创建目录

[hadoop@hadoop102 ~]$ mkdir -p /opt/module/doris

3.2 解压fe

[hadoop@hadoop102 software]$ tar -xvf apache-doris-fe-1.2.4.1-bin-x86_64.tar.xz -C /opt/module/doris

3.3 解压be

[hadoop@hadoop102 software]$ tar -xvf apache-doris-be-1.2.4.1-bin-x86_64.tar.xz -C /opt/module/doris

3.4 解压java udf函数

3.4.1 解压

[hadoop@hadoop102 software]$ tar -xvf apache-doris-dependencies-1.2.4.1-bin-x86_64.tar.xz -C /opt/module/doris

3.4.2 复制udf包到be

[hadoop@hadoop102 ~]$ cp /opt/module/doris/apache-doris-dependencies-1.2.4.1-bin-x86_64/java-udf-jar-with-dependencies.jar /opt/module/doris/apache-doris-be-1.2.4.1-bin-x86_64/lib/

四、配置FE

4.1 修改配置fe.conf

vim /opt/module/doris/apache-doris-fe-1.2.4.1-bin-x86_64/conf/fe.conf

修改内容:

# web 页面访问端口
http_port = 7030
# 配置文件中指定元数据路径:默认在 fe 的根目录下,可以不配
# meta_dir = /opt/module/doris/apache-doris-fe-1.2.4.1-bin-x86_64/doris-meta
# 修改绑定 ip
priority_networks = 172.28.76.203/24

注意:priority_networks配置依据,执行命令 ip a查询子网网段

在这里插入图片描述

4.2 启动/关闭FE

# 启动
[hadoop@hadoop102 ~]$ /opt/module/doris/apache-doris-fe-1.2.4.1-bin-x86_64/bin/start_fe.sh --daemon
# 关闭
[hadoop@hadoop102 ~]$ /opt/module/doris/apache-doris-fe-1.2.4.1-bin-x86_64/bin/stop_fe.sh

4.3 WEB访问测试

http://hadoop102:7030
用户名:root
密码:无

五、配置BE

5.1 修改配置be.conf

vim /opt/module/doris/apache-doris-be-1.2.4.1-bin-x86_64/conf/be.conf

修改内容:

# 不配置存储目录, 则会使用默认的存储目录
webserver_port = 7040 
priority_networks = 172.28.76.203/24
storage_root_path = /opt/module/doris/doris-storage1;/opt/module/doris/doris-storage2.SSD,10

5.2 创建目录

注意:存储目录必须手动提前创建

[hadoop@hadoop102 ~]$ cd /opt/module/doris/
[hadoop@hadoop102 doris]$ mkdir doris-storage1
[hadoop@hadoop102 doris]$ mkdir doris-storage2.SSD

5.3 分发BE

分发到需要安装BE的节点

[hadoop@hadoop102 doris]$ mytools_rsync apache-doris-be-1.2.4.1-bin-x86_64/

5.4 配置其他节点的BE

5.4.1 配置be.conf的ip

[hadoop@hadoop103 ~]$ vim /opt/module/doris/apache-doris-be-1.2.4.1-bin-x86_64/conf/be.conf
# 修改内容:
priority_networks = 172.28.76.204/24
[hadoop@hadoop104 ~]$ vim /opt/module/doris/apache-doris-be-1.2.4.1-bin-x86_64/conf/be.conf
# 修改内容:
priority_networks = 172.28.76.205/24

5.4.2 创建目录

# hadoop103
[hadoop@hadoop103 ~]$ cd /opt/module/doris/
[hadoop@hadoop103 doris]$ mkdir doris-storage1
[hadoop@hadoop103 doris]$ mkdir doris-storage2.SSD

# hadoop104
[hadoop@hadoop104 ~]$ cd /opt/module/doris/
[hadoop@hadoop104 doris]$ mkdir doris-storage1
[hadoop@hadoop104 doris]$ mkdir doris-storage2.SSD

六、添加BE

目的:将be和fe连接起来
需要使用mysql客户端连接doris

6.1 使用mysql客户端连接到FE

[mall@mall ~]$ mysql -hhadoop102 -P9030 -uroot

6.2 设定密码

mysql> SET PASSWORD FOR 'root' = PASSWORD('aaaaaa');

6.3 添加BE

mysql> 
ALTER SYSTEM ADD BACKEND "hadoop102:9050";
ALTER SYSTEM ADD BACKEND "hadoop103:9050";
ALTER SYSTEM ADD BACKEND "hadoop104:9050";

6.4 启动/关闭BE

# 启动
[hadoop@hadoop102 ~]$ /opt/module/doris/apache-doris-be-1.2.4.1-bin-x86_64/bin/start_be.sh --daemon
[hadoop@hadoop103 ~]$ /opt/module/doris/apache-doris-be-1.2.4.1-bin-x86_64/bin/start_be.sh --daemon
[hadoop@hadoop104 ~]$ /opt/module/doris/apache-doris-be-1.2.4.1-bin-x86_64/bin/start_be.sh --daemon
# 关闭
[hadoop@hadoop102 ~]$ /opt/module/doris/apache-doris-be-1.2.4.1-bin-x86_64/bin/stop_be.sh
[hadoop@hadoop103 ~]$ /opt/module/doris/apache-doris-be-1.2.4.1-bin-x86_64/bin/stop_be.sh
[hadoop@hadoop104 ~]$ /opt/module/doris/apache-doris-be-1.2.4.1-bin-x86_64/bin/stop_be.sh

七、测试

7.1 创建库

create database test_db;
use test_db;

7.2 创建表

7.3 插入数据

  • 21
    点赞
  • 20
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值