Apache KUDU 安装搭建

Apache KUDU 安装搭建

节点规划

节点角色
node1Master Server、Tablet Server
node2Master Server、Tablet Server
node3Kudu Client、Tablet Server
node4Master Server

配置NTP时钟同步

所有结点执行:yum -y install ntp && /etc/init.d/ntpd restart

配置yum源

[root@node1 ~]# wget -P /etc/yum.repos.d/ http://archive.cloudera.com/kudu/redhat/6/x86_64/kudu/cloudera-kudu.repo
[root@node1 ~]# scp /etc/yum.repos.d/cloudera-kudu.repo root@node2:/etc/yum.repos.d/
[root@node1 ~]# scp /etc/yum.repos.d/cloudera-kudu.repo root@node3:/etc/yum.repos.d/
[root@node1 ~]# scp /etc/yum.repos.d/cloudera-kudu.repo root@node4:/etc/yum.repos.d/

安装Kudu基础组件

所有安装Master、Tablet结点安装kudu基础组件
[root@node1 ~]# yum install kudu
[root@node2 ~]# yum install kudu
[root@node3 ~]# yum install kudu
[root@node4 ~]# yum install kudu

安装Kudu Master

Master结点安装kudu-master
[root@node1 ~]# yum install kudu-master
[root@node2 ~]# yum install kudu-master
[root@node4 ~]# yum install kudu-master

安装Kudu Tablet

Tablet结点安装kudu-tserver
[root@node1 ~]# yum install kudu-tserver
[root@node2 ~]# yum install kudu-tserver
[root@node3 ~]# yum install kudu-tserver

安装Kudu Client

[root@node3 ~]# yum install kudu-client0
[root@node3 ~]# yum install kudu-client-devel

配置所有Kudu Master

配置Kudu Master结点node1

cat /etc/default/kudu-master
    export FLAGS_log_dir=/var/log/kudu
    export FLAGS_rpc_bind_addresses=node1:7051

cat /etc/kudu/conf/master.gflagfile
    # Do not modify these two lines. If you wish to change these variables,
    # modify them in /etc/default/kudu-master.
    --fromenv=rpc_bind_addresses
    --fromenv=log_dir
    --fs_wal_dir=/var/lib/kudu/master
    --fs_data_dirs=/var/lib/kudu/master
    # 多个master结点
    --master_addresses=node1:7051,node2:7051,node4:7051

配置Kudu Master结点node2

cat /etc/default/kudu-master
    export FLAGS_log_dir=/var/log/kudu
    export FLAGS_rpc_bind_addresses=node2:7051

cat /etc/kudu/conf/master.gflagfile
    # Do not modify these two lines. If you wish to change these variables,
    # modify them in /etc/default/kudu-master.
    --fromenv=rpc_bind_addresses
    --fromenv=log_dir
    --fs_wal_dir=/var/lib/kudu/master
    --fs_data_dirs=/var/lib/kudu/master
    --master_addresses=node1:7051,node2:7051,node4:7051

配置Kudu Master结点node4

cat /etc/default/kudu-master
    export FLAGS_log_dir=/var/log/kudu
    export FLAGS_rpc_bind_addresses=node4:7051

cat /etc/kudu/conf/master.gflagfile
    # Do not modify these two lines. If you wish to change these variables,
    # modify them in /etc/default/kudu-master.
    --fromenv=rpc_bind_addresses
    --fromenv=log_dir
    --fs_wal_dir=/var/lib/kudu/master
    --fs_data_dirs=/var/lib/kudu/master
    --master_addresses=node1:7051,node2:7051,node4:7051

配置所有Kudu Tablet

配置Kudu Tablet结点node1

cat /etc/default/kudu-tserver
    export FLAGS_log_dir=/var/log/kudu
    export FLAGS_rpc_bind_addresses=node1:7050

cat /etc/kudu/conf/tserver.gflagfile
    # Do not modify these two lines. If you wish to change these variables,
    # modify them in /etc/default/kudu-tserver.
    --fromenv=rpc_bind_addresses
    --fromenv=log_dir
    --fs_wal_dir=/var/lib/kudu/tserver
    --fs_data_dirs=/var/lib/kudu/tserver
    #Tablet结点指向master结点
    --tserver_master_addrs=node1:7051,node2:7051,node4:7051

配置Kudu Tablet结点node2

cat /etc/default/kudu-tserver
    export FLAGS_log_dir=/var/log/kudu
    export FLAGS_rpc_bind_addresses=node2:7050

cat /etc/kudu/conf/tserver.gflagfile
    # Do not modify these two lines. If you wish to change these variables,
    # modify them in /etc/default/kudu-tserver.
    --fromenv=rpc_bind_addresses
    --fromenv=log_dir
    --fs_wal_dir=/var/lib/kudu/tserver
    --fs_data_dirs=/var/lib/kudu/tserver
    --tserver_master_addrs=node1:7051,node2:7051,node4:7051

配置Kudu Tablet结点node3

cat /etc/default/kudu-tserver
    export FLAGS_log_dir=/var/log/kudu
    export FLAGS_rpc_bind_addresses=node3:7050

cat /etc/kudu/conf/tserver.gflagfile
    # Do not modify these two lines. If you wish to change these variables,
    # modify them in /etc/default/kudu-tserver.
    --fromenv=rpc_bind_addresses
    --fromenv=log_dir
    --fs_wal_dir=/var/lib/kudu/tserver
    --fs_data_dirs=/var/lib/kudu/tserver
    --tserver_master_addrs=node1:7051,node2:7051,node4:7051

启动

启动Kudu Master

在node1 node2 node4结点执行:service  kudu-master  start

启动Kudu Tablet

在node1 node2 node3结点执行:service kudu-tserver start

验证

1、查看所有Master

http://node1:8051/masters

在这里插入图片描述

2、查看所有Tablet

http://node1:8051/tablet-servers

在这里插入图片描述

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值