参考官方文档
https://doris.apache.org/zh-CN/docs/dev/get-starting/
下载 - Apache Doris
Index of /apache/doris/1.2/1.2.2-rc01
#修改 /etc/security/limits.conf, 执行命令
vim /etc/security/limits.conf
#添加以下
* soft nofile 204800
* hard nofile 204800
* soft nproc 204800
* hard nproc 204800
#修改/etc/sysctl.conf
vim /etc/sysctl.conf
#添加以下内容
fs.file-max = 6553560
vm.max_map_count=2000000
#命令行执行
sysctl -w vm.max_map_count=2000000
tar -xvf apache-doris-be-1.2.2-bin-x86_64.tar.xz
tar -xvf apache-doris-dependencies-1.2.2-bin-x86_64.tar.xz
tar -xvf apache-doris-fe-1.2.2-bin-x86_64.tar.xz
mv apache-doris-be-1.2.2-bin-x86_64 be
mv apache-doris-fe-1.2.2-bin-x86_64 fe
mv apache-doris-dependencies-1.2.2-bin-x86_64 dependencies
#拷贝udf jar到be
cp dependencies/java-udf-jar-with-dependencies.jar be/lib/
#拷贝broker到be
cp -a dependencies/apache_hdfs_broker be/
doris/be/conf/be.conf
priority_networks = ip/16
storage_root_path = /home/doris/be/storage
flush_thread_num_per_store=5
enable_storage_vectorization=true
enable_low_cardinality_optimize=true
#启动be
cd be/bin
./start_be.sh --daemon
#如果没启动起来查看be/log/be.out
#启动broker
cd be/apache_hdfs_broker/bin
./start_broker.sh --daemon
#如果没启动起来查看be/apache_hdfs_broker/log/apache_hdfs_broker.out
启动fe
cd fe/bin
bin/start_fe.sh --daemon
curl http://127.0.0.1:8030/api/bootstrap
使用mysql客户端连接
ALTER SYSTEM ADD BACKEND "ip:9050";
建demo库
建表
导入数据
curl --location-trusted -u root: -T test.csv -H "column_separator:," http://127.0.0.1:8030/api/demo/example_tbl/_stream_load
查询数据
浏览器访问
http://ip:8030,账号root,密码不填就行
创建用户
CREATE USER 'test'@'%' IDENTIFIED BY '123456';
GRANT SELECT_PRIV ON *.*.* TO 'test'@'%';