Doris编译安装 0.14.0
作者:互联网
Doris安装文档
环境准备
硬件 | 参数 |
---|---|
数量 | 1台 |
内核 | CentOS Linux release 7.6.1810 (Core) |
CPU | 8核 2925.986Mhz |
架构 | x86_64 |
内存 | 128M |
硬盘 | sda 50G / sdb 200G /data |
- 关闭防火墙
# systemctl disable firewalld.service
# systemctl stop firewalld
- 安装jdk并配置到环境变量
# vi ~/.bash_profile
export JAVA_HOME=/opt/jdk1.8.0_152
export DORIS_HOME=/opt/doris-0.14.0
export PATH=${JAVA_HOME}/bin:$PATH
- 设置打开文件句柄数
# cat > /etc/security/limits.conf<< EOF
* soft nofile 65536
* hard nofile 65536
* soft nproc 131072
* hard nproc 131072
EOF
#手动设置
# imit -u 131072
#手动设置
# imit -n 65536
- 安装GCC环境
# yum install -y gcc
#检查GCC版本是否大于4.8.2
# gcc --version
下载源码
http://doris.apache.org/master/zh-CN/downloads/downloads.html
- 选择0.14.0版本源码下载
# cd ~
# mkdir -p /root/.m2
# wget https://mirrors.bfsu.edu.cn/apache/incubator/doris/0.14.0-incubating/apache-doris-0.14.0-incubating-src.tar.gz
# tar -zxvf apache-doris-0.14.0-incubating-src.tar.gz
编译源码
- 这里使用docker来编译
docker安装可参考官网 这里使用的是
docker --version
Docker version 1.13.1, build 0be3e21/1.13.1
# 拉取镜像
# docker pull apache/incubator-doris:build-env-1.2
# 启动编译环境,并挂载源码目录以及m2目录
# docker run -it -v /root/.m2:/root/.m2 -v /root/apache-doris-0.14.0-incubating-src/:/root/apache-doris-0.14.0-incubating-src/ apachedoris/doris-dev:build-env-1.2
- 开始编译
# sh build.sh
- 想使用mysql外部表,则加入如下参数进行编译
# WITH_MYSQL=1 sh build.sh
启动fe
- 配置
fe/conf/fe.conf
JAVA_HOME=/opt/jdk1.8.0_152
priority_networks = 10.30.20.52/24
- 提前创建fe的元数据目录
mkdir -p /opt/doris-0.14.0/fe/doris-meta/
- 启动fe
sh bin/start_fe.sh --daemon
- 是否启动成功通过浏览器访问http://10.30.20.52:8030/api/bootstrap
{
"replayedJournalId": 0,
"queryPort": 0,
"rpcPort": 0,
"version": "",
"status": "OK",
"msg": "Success"
}
- 有错误可以看
fe/log/fe.out
- 成功后使用mysql客户端登录,然后为fe添加be,为be做启动做准备
# mysql -h 10.30.20.52 -u root -P 9030
mysql> ALTER SYSTEM ADD BACKEND "10.30.20.52:9050";
启动be
- 配置
be/conf/be.conf
priority_networks = 10.30.20.52/24
# 数据存储文件夹,可以用多个,用英文分号隔开
storage_root_path = /data/doris/be_01/storage
- 创建数据存储文件夹
# mkdir -p /data/doris/be_01/storage
- 启动be
# sh bin/start_be.sh --daemon
- 查看日志看是否有错误
# cat be/log/be.INFO
配置用户以及密码
- 登录Doris,默认无密码
# 创建测试数据库
create database test;
#查看be状态
SHOW PROC '/backends';
#为root用户设置密码
SET PASSWORD = PASSWORD('1234567');
#创建doirs用户
CREATE USER doris@'%' IDENTIFIED BY "1234567";
#给doris用户授权
GRANT Select_priv ON *.* TO 'doris'@'%';
GRANT Load_priv ON *.* TO 'doris'@'%';
GRANT Alter_priv ON *.* TO 'doris'@'%';
GRANT Create_priv ON *.* TO 'doris'@'%';
GRANT Drop_priv ON *.* TO 'doris'@'%';
GRANT Usage_priv ON *.* TO 'doris'@'%';
完成安装
10.30.20.52:9030
root/1234567
doris/1234567
标签:编译,Doris,0.14,sh,fe,apache,root,doris 来源: https://blog.csdn.net/qq_43716478/article/details/117673150