0.下载rpm包
地址:http://archive.cloudera.com/cdh5/redhat/7/x86_64/cdh/5.15.0/RPMS/x86_64
package:
kudu-1.7.0+cdh5.15.0+0-1.cdh5.15.0.p0.52.el7.x86_64.rpm
kudu-client-devel-1.7.0+cdh5.15.0+0-1.cdh5.15.0.p0.52.el7.x86_64.rpm
kudu-client0-1.7.0+cdh5.15.0+0-1.cdh5.15.0.p0.52.el7.x86_64.rpm
kudu-debuginfo-1.7.0+cdh5.15.0+0-1.cdh5.15.0.p0.52.el7.x86_64.rpm
kudu-master-1.7.0+cdh5.15.0+0-1.cdh5.15.0.p0.52.el7.x86_64.rpm
kudu-tserver-1.7.0+cdh5.15.0+0-1.cdh5.15.0.p0.52.el7.x86_64.rpm
1.新建新用户
[root@spark001 kudu]# useradd kudu
[root@spark001 kudu]# passwd kudu
2.配置免秘钥
[root@spark001 kudu]# vim /etc/sudoers
kudu ALL=(root)NOPASSWD:ALL
3.查看系统版本
[root@spark001 kudu]# cat /etc/redhat-release
CentOS Linux release 7.5.1804 (Core)
4.查看本地的yum源
4.1备份原来的yum源
[root@spark001 yum.repos.d]# mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
[root@spark001 yum.repos.d]#
[root@spark001 yum.repos.d]# ll
total 40
-rw-r–r--. 1 root root 1664 Apr 29 2018 CentOS-Base.repo.backup
-rw-r–r--. 1 root root 1309 Apr 29 2018 CentOS-CR.repo
-rw-r–r--. 1 root root 649 Apr 29 2018 CentOS-Debuginfo.repo
-rw-r–r--. 1 root root 314 Apr 29 2018 CentOS-fasttrack.repo
-rw-r–r--. 1 root root 630 Apr 29 2018 CentOS-Media.repo
-rw-r–r--. 1 root root 1331 Apr 29 2018 CentOS-Sources.repo
-rw-r–r--. 1 root root 4768 Apr 29 2018 CentOS-Vault.repo
-rw-r–r--. 1 root root 133 Nov 14 2018 gitlab-ce.repo
-rw-r–r--. 1 root root 206 May 21 19:29 influxdb.repo
[root@spark001 yum.repos.d]#
4.2下载阿里云的CentOS-Base.repo 到/etc/yum.repos.d/
[root@spark001 yum.repos.d]# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
–2019-09-13 05:16:29-- http://mirrors.aliyun.com/repo/Centos-7.repo
Resolving mirrors.aliyun.com (mirrors.aliyun.com)… 118.112.15.95, 118.112.15.11, 124.116.187.117, …
Connecting to mirrors.aliyun.com (mirrors.aliyun.com)|118.112.15.95|:80… connected.
HTTP request sent, awaiting response… 200 OK
Length: 2523 (2.5K) [application/octet-stream]
Saving to: ‘/etc/yum.repos.d/CentOS-Base.repo’
100%[==============================================>] 2,523 --.-K/s in 0s
2019-09-13 05:16:29 (115 MB/s) - ‘/etc/yum.repos.d/CentOS-Base.repo’ saved [2523/2523]
[root@spark001 yum.repos.d]#
4.3 清理缓存
[root@spark001 yum.repos.d]# yum clean all
Loaded plugins: fastestmirror
Cleaning repos: base extras gitlab-ce influxdb updates
Cleaning up everything
Maybe you want: rm -rf /var/cache/yum, to also free up space taken by orphaned data from disabled or removed repos
Cleaning up list of fastest mirrors
4.4 生成新的缓存
[root@spark001 yum.repos.d]# yum makecache
…等待
5.安装其余依赖
[root@spark001 kudu]# yum -y install cyrus-sasl-plain lsb ntp
yum install -y gcc python-devel
yum install -y cyrus-sasl*
6.时钟同步,kudu对时间要求很精准
[root@spark001 kudu]# ntpdate -u ntp.api.bz
25 Sep 14:44:45 ntpdate[25743]: step time server 114.118.7.163 offset 1070387.206978 sec
7.开启ntp 服务
[root@spark001 kudu]# systemctl status ntpd.service
● ntpd.service - Network Time Service
Loaded: loaded (/usr/lib/systemd/system/ntpd.service; disabled; vendor preset: disabled)
Active: inactive (dead)
[root@spark001 kudu]# systemctl start ntpd.service
8.把kudu所有的rpm包长传到kudu用户的家目录下
[root@spark001 kudu]# su - kudu
[kudu@spark001 ~]$
[kudu@spark001 ~]$ pwd
/home/kudu
[kudu@spark001 ~]$ rz
rz waiting to receive.
[kudu@spark001 ~]$ ll
total 355828
-rw-r–r--. 1 kudu kudu 121680752 Sep 25 14:32 kudu-1.7.0+cdh5.15.0+0-1.cdh5.15.0.p0.52.el7.x86_64.rpm
-rw-r–r--. 1 kudu kudu 4073948 Sep 25 14:23 kudu-client0-1.7.0+cdh5.15.0+0-1.cdh5.15.0.p0.52.el7.x86_64.rpm
-rw-r–r--. 1 kudu kudu 56436 Sep 25 14:22 kudu-client-devel-1.7.0+cdh5.15.0+0-1.cdh5.15.0.p0.52.el7.x86_64.rpm
-rw-r–r--. 1 kudu kudu 238530944 Sep 25 14:36 kudu-debuginfo-1.7.0+cdh5.15.0+0-1.cdh5.15.0.p0.52.el7.x86_64.rpm
-rw-r–r--. 1 kudu kudu 5784 Sep 25 14:22 kudu-master-1.7.0+cdh5.15.0+0-1.cdh5.15.0.p0.52.el7.x86_64.rpm
-rw-r–r--. 1 kudu kudu 5816 Sep 25 14:22 kudu-tserver-1.7.0+cdh5.15.0+0-1.cdh5.15.0.p0.52.el7.x86_64.rpm
[kudu@spark001 ~]$
9.安装rpm包
[kudu@spark001 ~]$ sudo rpm -ivh kudu*
warning: kudu-1.7.0+cdh5.15.0+0-1.cdh5.15.0.p0.52.el7.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID e8f86acd: NOKEY
Preparing… ################################# [100%]
Updating / installing…
1:kudu-1.7.0+cdh5.15.0+0-1.cdh5.15.################################# [ 17%]
2:kudu-client0-1.7.0+cdh5.15.0+0-1.################################# [ 33%]
3:kudu-client-devel-1.7.0+cdh5.15.0################################# [ 50%]
4:kudu-master-1.7.0+cdh5.15.0+0-1.c################################# [ 67%]
5:kudu-tserver-1.7.0+cdh5.15.0+0-1.################################# [ 83%]
6:kudu-debuginfo-1.7.0+cdh5.15.0+0-################################# [100%]
10. 配置文件
数据和日志的存储目录规划:
rm -rf /data/kudu/
master 元数据目录
sudo mkdir -p /data/kudu/kudu_tmaster_data
table数据目录
sudo mkdir -p /data/kudu/kudu_tserver_data
log 目录
sudo mkdir -p /data/kudu/log
修改配置文件:
[root@localhost ~]# cd /etc/kudu/conf
[root@localhost conf]# ll
total 8
-rw-r–r--. 1 root root 233 May 24 2018 master.gflagfile
-rw-r–r--. 1 root root 236 May 24 2018 tserver.gflagfile
[root@localhost conf]#
第一个:master.gflagfile
[root@localhost conf]# vim 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=/data/kudu/kudu_tmaster_data
--fs_data_dirs=/data/kudu/kudu_tmaster_data
第二个:tserver.gflagfile
[root@localhost conf]# vim 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=/data/kudu/kudu_tserver_data
--fs_data_dirs=/data/kudu/kudu_tserver_data
--tserver_master_addrs=spark001:7051
其余说明:
kudu分为主从架构的,
主master 7051
从tserver 7050
[kudu@spark001 ~]$ cat /etc/default/kudu-master
export FLAGS_log_dir=/var/log/kudu
export FLAGS_rpc_bind_addresses=0.0.0.0:7051
[kudu@spark001 ~]$ cat /etc/default/kudu-tserver
export FLAGS_log_dir=/var/log/kudu
export FLAGS_rpc_bind_addresses=0.0.0.0:7050
[kudu@spark001 ~]$
11. 启动kudu
[kudu@spark001 ~]$ sudo /etc/init.d/kudu-master start
Started Kudu Master Server (kudu-master): [ OK ]
[kudu@spark001 ~]$ sudo /etc/init.d/kudu-tserver start
Started Kudu Tablet Server (kudu-tserver): [ OK ]
[kudu@spark001 ~]$
RPC端口:
tcp 0 0 0.0.0.0:7051 0.0.0.0:* LISTEN 11476/kudu-master
tcp 0 0 0.0.0.0:7050 0.0.0.0:* LISTEN 11575/kudu-tserver
12. WEB-UI
WebUI端口:
kudu-master : http://192.168.1.117:8051
tcp 0 0 0.0.0.0:8051 0.0.0.0:* LISTEN 11476/kudu-master
kudu-tserver : http://192.168.1.117:8050
tcp 0 0 0.0.0.0:8050 0.0.0.0:* LISTEN 11575/kudu-tserver