doris 单节点安装
Last updated on November 20, 2024 am
🧙 Questions
单节点安装doris
1.1.2
☄️ Ideas
下载doris
wget https://dist.apache.org/repos/dist/release/doris/1.1/1.1.2-rc05/apache-doris-fe-1.1.2-bin.tar.gz
wget https://dist.apache.org/repos/dist/release/doris/1.1/1.1.2-rc05/apache-doris-be-1.1.2-bin-x86_64.tar.gz
创建安装目录
sudo mkdir -p /data/doris
sudo chown -R ispong:ispong /data/doris
mkdir -p /data/doris/doris-1.1.2
解压创建软链接
tar -vzxf apache-doris-fe-1.1.2-bin.tar.gz
tar -vzxf apache-doris-be-1.1.2-bin-x86_64.tar.gz
mv apache-doris-fe-1.1.2-bin/* /data/doris/doris-1.1.2/
rm -rf /data/doris/doris-1.1.2/licenses
mv apache-doris-be-1.1.2-bin-x86_64/* /data/doris/doris-1.1.2/
sudo ln -s /data/doris/doris-1.1.2 /opt/doris
配置系统环境
sudo vim /etc/profile
export DORIS_HOME=/opt/doris
export PATH=$PATH:$DORIS_HOME/fe/bin
export PATH=$PATH:$DORIS_HOME/be/bin
export PATH=$PATH:$DORIS_HOME/apache_hdfs_broker/bin
source /etc/profile
配置FE
vim /opt/doris/fe/conf/fe.conf
# 默认端口号 `8030` 和yarn端口号冲突,前端UI访问端口 feNode
http_port = 18030
# 默认端口号 `9030` mysql客户端链接端口
query_port = 9030
启动FE
关闭FE: sh bin/stop_fe.sh –daemon
cd /opt/doris/fe
sh bin/start_fe.sh --daemon
tail -f /opt/doris/fe/log/fe.log
- http://isxcode:18030
- username: root
- password: (empty)
mysql客户端访问
# root 默认没有密码
docker exec -it isxcode-mysql bash
mysql -u root -h 172.26.34.194 -P 9030
配置BE
vim /opt/doris/be/conf/be.conf
# 默认端口号 `9050` 留给FE访问
heartbeat_service_port = 9050
# 默认端口号 `8040` 和nodeManger默认端口号冲突
webserver_port = 18040
启动BE
关闭BE: bash bin/stop_be.sh –daemon
cd /opt/doris/be
bash bin/start_be.sh --daemon
tail -f /opt/doris/be/log/be.out
查看BE服务是否启动
netstat -nlpt | grep 9060
将BE添加到FE中
ALTER SYSTEM ADD BACKEND "isxcode:9050";
SHOW PROC '/backends';
检查Alive参数是否为true
+-----------+-----------------+---------------+----------+---------------+--------+----------+----------+---------------------+---------------------+-------+----------------------+-----------------------+-----------+------------------+---------------+---------------+---------+----------------+--------------------------+--------+----------------------+-------------------------------------------------------------------------------------------------------------------------------+
| BackendId | Cluster | IP | HostName | HeartbeatPort | BePort | HttpPort | BrpcPort | LastStartTime | LastHeartbeat | Alive | SystemDecommissioned | ClusterDecommissioned | TabletNum | DataUsedCapacity | AvailCapacity | TotalCapacity | UsedPct | MaxDiskUsedPct | Tag | ErrMsg | Version | Status |
+-----------+-----------------+---------------+----------+---------------+--------+----------+----------+---------------------+---------------------+-------+----------------------+-----------------------+-----------+------------------+---------------+---------------+---------+----------------+--------------------------+--------+----------------------+-------------------------------------------------------------------------------------------------------------------------------+
| 10002 | default_cluster | 172.26.34.194 | isxcode | 9050 | 9060 | 18040 | 8060 | 2022-10-11 16:07:50 | 2022-10-11 16:14:09 | true | false | false | 0 | 0.000 | 13.619 GB | 39.246 GB | 65.30 % | 65.30 % | {"location" : "default"} | | 1.1.2-rc05-a8323dae4 | {"lastSuccessReportTabletsTime":"2022-10-11 16:13:55","lastStreamLoadTime":-1,"isQueryDisabled":false,"isLoadDisabled":false} |
+-----------+-----------------+---------------+----------+---------------+--------+----------+----------+---------------------+---------------------+-------+----------------------+-----------------------+-----------+------------------+---------------+---------------+---------+----------------+--------------------------+--------+----------------------+-------------------------------------------------------------------------------------------------------------------------------+
配置Broker
vim /opt/doris/apache_hdfs_broker/conf/apache_hdfs_broker.conf
# 默认端口号 `8000`
broker_ipc_port=8000
启动Broker
关闭Broker: sh bin/stop_broker.sh –daemon
cd /opt/doris/apache_hdfs_broker
sh bin/start_broker.sh --daemon
tail -f /opt/doris/apache_hdfs_broker/log/apache_hdfs_broker.log
netstat -nlpt | grep 8000
添加Broker到FE
broker username: ispong_broker
ALTER SYSTEM ADD BROKER ispong_broker "isxcode:8000";
SHOW PROC '/brokers';
检查Alive是否为
true
+---------------+---------------+----------+------+-------+---------------------+---------------------+--------+
| Name | IP | HostName | Port | Alive | LastStartTime | LastUpdateTime | ErrMsg |
+---------------+---------------+----------+------+-------+---------------------+---------------------+--------+
| ispong_broker | 172.26.34.194 | isxcode | 8000 | true | 2022-10-11 16:20:24 | 2022-10-11 16:20:24 | |
+---------------+---------------+----------+------+-------+---------------------+---------------------+--------+
🔗 Links
doris 单节点安装
https://ispong.isxcode.com/db/doris/doris 单节点安装/