Docker(Doris)

2023-07-17  本文已影响0人  冰菓_

Docker部署Doris

  1. 将 Linux 操作系统的内核参数设置为2000000
    sudo sysctl -w vm.max_map_count=2000000

  2. 下载Docker 开发环境镜像和安装包

docker pull apache/doris:build-env-ldb-toolchain-latest
wget https://apache-doris-releases.oss-accelerate.aliyuncs.com/apache-doris-1.2.4.1-bin-x86_64.tar.xz
wget https://doris-build-hk.oss-cn-hongkong.aliyuncs.com/mysql-client/mysql-5.7.22-linux-glibc2.12-x86_64.tar.gz

3.启动镜像与分发安装包

docker run -d -it --name=doris
-p 9030:9030 -p 8030:8030
apache/doris:build-env-ldb-toolchain-latest
/bin/bash
docker cp mysql-5.7.22-linux-glibc2.12-x86_64.tar.gz doris:/opt
docker cp apache-doris-1.2.4.1-bin-x86_64.tar.xz doris:/opt (到文件处cp)

  1. 解压

docker exec -it doris bash
cd /opt/
tar -xvf apache-doris-1.2.4.1-bin-x86_64.tar.xz
tar -xzvf mysql-5.7.22-linux-glibc2.12-x86_64.tar.gz
hostname -i

  1. 配置fe

vi conf/fe.conf 取消注释及修改Ip地址 priority_networks = 172.17.0.2/24
启动fe ./bin/start_fe.sh --daemon
curl http://127.0.0.1:8030/api/bootstrap
接着在mysql中连接fe,默认无密码
/opt/mysql-5.7.22-linux-glibc2.12-x86_64/bin/mysql -uroot -P9030 -h127.0.0.1 --skip-ssl
show frontends\G;

  1. 配置be

cd /opt/apache-doris-1.2.4.1-bin-x86_64/be
vi conf/be.conf
取消注释及修改Ip地址 priority_networks = 172.17.0.2/24
vi bin/start_be.sh
export JAVA_HOME=/usr/lib/jvm/java-1.8.0
./bin/start_be.sh --daemon
/opt/mysql-5.7.22-linux-glibc2.12-x86_64/bin/mysql -uroot -P9030 -h127.0.0.1 --skip-ssl
ALTER SYSTEM ADD BACKEND "172.17.0.2:9050";
SHOW BACKENDS\G

8030/home
mysql中连接fe
Alive : true表示节点运行正常
数据导入测试
查询测试与远程连接测试

{未解决}

  1. be起不来,可能是CPU不够用
  2. hostname -i 竟然会变,第二次重启的时,fe重启失败,查看原因是hostname不一致修改后,查看log,重启fe,报错也是hostname是并不一致的,我明明改过了啊....
  3. doris java.net.NoRouteToHostException: No route to host
上一篇下一篇

猜你喜欢

热点阅读