diff --git a/Pasted image 20240818193959.png b/Pasted image 20240818193959.png new file mode 100644 index 0000000..490430d Binary files /dev/null and b/Pasted image 20240818193959.png differ diff --git a/Pasted image 20240818194732.png b/Pasted image 20240818194732.png new file mode 100644 index 0000000..ea0afda Binary files /dev/null and b/Pasted image 20240818194732.png differ diff --git a/本机环境/开发环境.md b/本机环境/开发环境.md index 45f47c9..6dbf6ae 100644 --- a/本机环境/开发环境.md +++ b/本机环境/开发环境.md @@ -111,4 +111,39 @@ export PATH="/opt/homebrew/opt/node@16/bin:$PATH" arch -x86_64 zsh source ~/.nvm/nvm.sh nvm install 14.21.3 -``` \ No newline at end of file +``` + ++ doris 部署 +1. 构建be和fe镜像,参考官方文档[Docker 部署 - Apache Doris](https://doris.apache.org/zh-CN/docs/2.1/install/cluster-deployment/run-docker-cluster) +![[Pasted image 20240818193959.png]] +```shell +cd ./docker-build/fe +docker build . -t apache-doris:2.0.14-fe +``` + +2. docker部署 +```shell +# windwos docker 需要先设置max_map_count并且关闭swap分区 +# 在powershell中执行wsl -d docker-desktop (每次docker启动前先执行此命令不然BE无法启动) +sysctl -w vm.max_map_count=2000000 +swapoff -a +``` + +```shell +# 创建网络 +docker network create --subnet=172.10.70.0/24 doris-network +# FE (注意-v 路径替换) +docker run -itd --name=fe --env FE_SERVERS="fe1:172.10.70.2:9010" --env FE_ID=1 -p 8030:8030 -p 9030:9030 -v G:\data\doris\fe\doris-meta:/opt/apache-doris/fe/doris-meta -v G:\data\doris\fe\log:/opt/apache-doris/fe/log -v G:\data\doris\fe\conf\fe.conf:/opt/apache-doris/fe/conf/fe.conf --network=doris-network --ip=172.10.70.2 apache-doris:2.0.14-fe +# BE +docker run -itd --name=be --env MASTER_FE_IP="fe1:172.10.70.2:9010" --env CURRENT_BE_IP="172.10.70.3" --env CURRENT_BE_PORT="9050" -p 8040:8040 -v G:\data\doris\be\storage:/opt/apache-doris/be/storage -v G:\data\doris\be\log:/opt/apache-doris/be/log -v G:\data\doris\be\conf\be.conf:/opt/apache-doris/be/conf/be.conf --network=doris-network --ip=172.10.70.3 apache-doris:2.0.14-be +``` + +fe界面:http://localhost:8030 账号root 无密码 +在playground中添加BE地址 + +```sql +ALTER SYSTEM ADD BACKEND "172.10.70.3:9050"; +``` + +![[Pasted image 20240818194732.png]] +be界面:http://localhost:8040 \ No newline at end of file