最近调研doris 吧一些安装和部署的细节做一下记录吧 以后可以用:
首先是安装 建议用docker 11的版本在Linus安装一直都有问题 在docker就可以成功安装:
具体步骤:
1. pull doris dev docker image

sudo docker pull apachedoris/doris-dev:build-env-1.1

2. dowload doris-0.11.20 source local

mkdir -p /home/lenmom/wget https://codeload.github.com/baidu-doris/incubator-doris/tar.gz/DORIS-0.11.20-release
tar -xzvf incubator-doris-DORIS-0.11.20-release.tar.gz
mv incubator-doris-DORIS-0.11.20-release  doris-0.11.20-release

3.build

sudo docker  run -it  -v /home/lenmom/doris-0.11.20-release:/root/doris-0.11.20   --name doris_dev  apachedoris/doris-dev:build-env-1.1  //bin/bash

export PATH=$PATH:$JAVA_HOME/bin:$MAVEN_HOME/bin && cd /root/doris-0.11.20 && sh build.sh

大概一个小时多一点差不多了 但是在自己主机上好久都没有build成功
这里要注意有一个地方要改一下:
项目fe目录下的pom文件 有一个

<pluginRepositories>
                <!-- for cup-maven-plugin -->
                <pluginRepository>
                    <id>spring-plugins</id>
                    <url>**https** : //repo.spring.io/plugins-release/</url>
                </pluginRepository>
            </pluginRepositories>

http要改为加s的不然就会报错

到这里最基础的算是安装完成了
但是如果要想重hdfs上load表 还需要buildbroker
那就来到docker里 执行以下sh build.sh
这里在docker里好像没有什么错误 但是在Linus上还是会有错误 这个就要具体情况具体分析了。

然后是部署
首先我们要部署fe节点把你第一次build完成的最外面的那个output文件夹下fe里的文件和文件夹cp到fe里面去 改fe文件夹里conf文件夹下的配置文件

# store metadata, create it if it is not exist.
meta_dir = ${DORIS_HOME}/palo-meta #这个目录要自己创建

http_port = 8030
rpc_port = 9020
query_port = 9030 --这个是你mysql接入需要的端口
edit_log_port = 9010# 注意这些端口要确定现在没有被占用不然会启动失败

# Choose one if there are more than one ip except loopback address. 
# Note that there should at most one ip match this list.
# If no ip match this rule, will choose one randomly.
# use CIDR format, e.g. 10.10.10.0/24
# Default value is empty.
priority_networks = 172.30.22.80/24#这个fe节点的ip

# Advanced configurations 
# log_roll_size_mb = 1024
# sys_log_dir = ${DORIS_HOME}/log #可以在这里查看日志 这个目录自己生成
# sys_log_roll_num = 10
# sys_log_verbose_modules = 
# audit_log_dir = ${DORIS_HOME}/log
# audit_log_modules = slow_query, query
# audit_log_roll_num = 10
# meta_delay_toleration_second = 10
# qe_max_connection = 1024
# max_conn_per_user = 100
# qe_query_timeout_second = 300
# qe_slow_log_ms = 5000

然后就可以启动了
mysql -p 9030 -h xxxxxx -u root
这里是不用密码的密码可以进入之后自己设置
具体设置等以后补充

然后是be节点把你第一次build完成的最外面的那个output文件夹下be里的文件和文件夹cp到be里面去 改be文件夹里conf文件夹下的配置文件
然后也是配置节点 在里面加上这一个注意这个要自己创建目录在自己的be里main创建

storage_root_path = /home/tujia/doris-0.11.20-release/palo

然后是broker
hdfs-site.xml 把你集群对应的内容写进去
apache_hdfs_broker.conf这个里面的端口配置好方便一会用

···

添加borker节点

ALTER SYSTEM ADD BROKER broker1 "173.29.40.42:8000";

添加be节点

ALTER SYSTEM ADD BACKEND "172.29.40.42:9050";

查看be broker

···

 show proc “/backends”

 SHOW PROC “/brokers”;

 ···mysql -h 172.29.40.42 -P9030 -uroot

 sudo netstat -tunlp

 docker

 docker run -it containerid /bin/bash

 docker exec -it containerid /bin/bash

 docker cp 文件 containerid :docker文件CREATE TABLE IF NOT EXISTS example_db.expamle_tbl

 (

user_id LARGEINT NOT NULL COMMENT “用户id”,

date DATE NOT NULL COMMENT “数据灌入日期时间”,

timestamp DATETIME NOT NULL COMMENT “数据灌入的时间戳”,

city VARCHAR(20) COMMENT “用户所在城市”,

age SMALLINT COMMENT “用户年龄”,

sex TINYINT COMMENT “用户性别”,

last_visit_date DATETIME REPLACE DEFAULT “1970-01-01 00:00:00” COMMENT “用户最后一次访问时间”,

cost BIGINT SUM DEFAULT “0” COMMENT “用户总消费”,

max_dwell_time INT MAX DEFAULT “0” COMMENT “用户最大停留时间”,

min_dwell_time INT MIN DEFAULT “99999” COMMENT “用户最小停留时间”

 )

 ENGINE=olap

 AGGREGATE KEY(user_id, date, timestamp, city, age, sex)

 PARTITION BY RANGE(date)

 (

 PARTITION p201701 VALUES LESS THAN (“2017-02-01”),

 PARTITION p201702 VALUES LESS THAN (“2017-03-01”),

 PARTITION p201703 VALUES LESS THAN (“2017-04-01”)

 )

 DISTRIBUTED BY HASH(user_id) BUCKETS 16

 PROPERTIES

 (

 “replication_num” = “3”,

 “storage_medium” = “SSD”,

 “storage_cooldown_time” = “2018-01-01 12:00:00”

 );doris 配置

 storage_root_path = /home/hadoopcdh/incubator-doris-DORIS-0.11.33.1-release/be/palo

 priority_networks = 172.29.40.42/24;192.168.0.0/16

 ALTER SYSTEM ADD BACKEND “172.29.40.42:9050”;

 show proc “/backends”

 SHOW PROC “/brokers”;

 ALTER SYSTEM ADD BROKER broker1 “173.29.40.42:8000”;

 ALTER SYSTEM drop BROKER broker1 “173.29.40.42:8000”;scp -r local_folder remote_username@remote_ip:remote_folder

 或者

 scp -r local_folder remote_ip:remote_folder···