1、Centos:

1.1、单机安装

1.1.1、安装ntp服务

Kudu需要时间同步服务,即使是单机版,否则启动报错

  1. # 安装
  2. yum install chrony -y
  3. # 配置
  4. vim /etc/chrony.conf
  5. server controller iburst
  6. #启动
  7. systemctl enable chronyd.service
  8. systemctl restart chronyd.service
  9. ntpdate controller
  10. #验证
  11. chronyc sources
  12. chronyc sources -v 查看状态说明
  13. timedatectl

1.1.2、配置kudu镜像仓库

  1. # 配置yum
  2. vim /etc/yum.repos.d/kudu.repo
  3. [kudu]
  4. name=kudu
  5. baseurl=http://archive.cloudera.com/beta/kudu/redhat/7/x86_64/kudu/0/
  6. gpgcheck=0
  7. # 更新
  8. yum clean all
  9. yum makecache

1.1.3、安装kudu

  1. # 安装
  2. yum install kudu kudu-master kudu-tserver kudu-client0 kudu-client-devel -y

1.1.4、启动

  1. systemctl start kudu-master
  2. systemctl start kudu-tserver
  3. systemctl enable kudu-master
  4. systemctl enable kudu-tserver

1.2、集群安装

三节点:

1.2.1、安装

  1. # 安装
  2. yum install kudu kudu-master kudu-tserver kudu-client0 kudu-client-devel -y

1.2.2、修改配置文件

三个节点上执行

  1. vim /etc/kudu/conf/master.gflagfile
  2. --fs_wal_dir=/opt/data/kudu/master
  3. --fs_data_dirs=/opt/data/kudu/master
  4. --master_addresses=node-1:7051,node-2:7051,node-3:7051
  5. vim /etc/kudu/conf/tserver.gflagfile
  6. --fs_wal_dir=/opt/data/kudu/tserver
  7. --fs_data_dirs=/opt/data/kudu/tserver
  8. --tserver_master_addrs=node-1:7051,node-2:7051,node-3:7051
  9. # 不同节点主机名不一样
  10. [root@node-1 conf]# cat /etc/default/kudu-master
  11. export FLAGS_log_dir=/var/log/kudu
  12. export FLAGS_rpc_bind_addresses=node-1:7051
  13. [root@node-1 conf]# cat /etc/default/kudu-tserver
  14. export FLAGS_log_dir=/var/log/kudu
  15. export FLAGS_rpc_bind_addresses=node-1:7050
  16. # 修改目录权限
  17. chown -R /opt/data/kudu

1.2.3、安装ntp服务

三个节点执行:如果需要一台ntpd服务端,可以将其配置成服务端

客户端:

  1. yum install ntp -y
  2. # 配置
  3. vim /etc/ntp.conf
  4. #server 0.centos.pool.ntp.org iburst
  5. #server 1.centos.pool.ntp.org iburst
  6. #server 2.centos.pool.ntp.org iburst
  7. #server 3.centos.pool.ntp.org iburst
  8. server 192.100.3.221 iburst
  9. # 设置开启服务后自动同步上级ntp server时间
  10. vim /etc/ntp/step-tickers
  11. 192.100.3.221
  12. # 启动
  13. systemctl restart ntpd
  14. systemctl enable ntpd
  15. # 开启同步
  16. ntpdate 192.100.3.221
  17. # 查看
  18. [root@node-1 conf]# ntpq -p
  19. remote refid st t when poll reach delay offset jitter
  20. ==============================================================================
  21. *yum_repository 192.100.3.221 11 u 42 64 377 0.167 0.667 0.123
  22. 前面有*说明同步成功
  23. # 查看是否开启 NTP synchronized: yes
  24. timedatectl
  25. ntpstat

1.2.4、启动

  1. systemctl start kudu-master
  2. systemctl start kudu-tserver
  3. # 开启自动启动
  4. chkconfig kudu-master on
  5. chkconfig kudu-tserver on

1.2.5、查看日志

cd /var/log/kudu