一安装1下载安装包[rootbigdata137 src]# wget https://download.selectdb.com/apache-doris-2.1.8.1-bin-x64.tar.gz --2026-03-16 08:38:21-- https://download.selectdb.com/apache-doris-2.1.8.1-bin-x64.tar.gz Resolving download.selectdb.com (download.selectdb.com)... 121.29.38.253, 121.29.38.249, 121.29.38.248, ... Connecting to download.selectdb.com (download.selectdb.com)|121.29.38.253|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 2898376749 (2.7G) [application/gzip] Saving to: ‘apache-doris-2.1.8.1-bin-x64.tar.gz’ 100%[] 2,898,376,749 9.26MB/s in 5m 54s 2026-03-16 08:44:16 (7.80 MB/s) - ‘apache-doris-2.1.8.1-bin-x64.tar.gz’ saved [2898376749/2898376749] [rootbigdata137 src]#2修改环境变量1修改最大文件打开句柄数vi /etc/security/limits.conf * soft nofile 1000000 * hard nofile 10000002修改虚拟内存区域# 永久修改虚拟内存区域大小并立即生效# 永久修改虚拟内存区域大小并立即生效 cat /etc/sysctl.conf EOF vm.max_map_count 2000000 EOF # 使配置立即生效 sudo sysctl -p3安装FE1解压doris2配置FE的配置文件# 编辑 FE 配置文件 apache-doris/fe/conf/fe.conf修改以下参数JAVA_HOME/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.412.b08-1.el7_9.x86_64 priority_networks127.0.0.1/323启动BE[rootbigdata137 bin]# ./start_fe.sh --daemon[rootbigdata137 bin]# jps 71225 DorisFE 71982 Jps4集群中注册BE节点使用MySQL链接Doris[rootbigdata137 ~]# mysql -uroot -P9030 -h127.0.0.1 -e show frontends ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | Name | Host | EditLogPort | HttpPort | QueryPort | RpcPort | ArrowFlightSqlPort | Role | IsMaster | ClusterId | Join | Alive | ReplayedJournalId | LastStartTime | LastHeartbeat | IsHelper | ErrMsg | Version | CurrentConnected | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | fe_31bdc620_7fb1_4199_a2d2_815ea67ee05e | 192.168.67.137 | 9010 | 8030 | 9030 | 9020 | -1 | FOLLOWER | true | 1574010013 | true | true | 95 | 2026-03-16 09:50:59 | 2026-03-16 09:51:49 | true | | doris-2.1.8-1-834d802457 | Yes | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ [rootbigdata137 ~]# ^C [rootbigdata137 ~]#4安装BE1修改BE配置文件JAVA_HOME/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.412.b08-1.el7_9.x86_64 priority_networks192.168.67.137/322启动BE./start_be.sh --daemon3手动添加BE到FE登录到Doris客户端将BE添加到FE。# 执行添加 BE 命令9050 是 BE 默认的 heartbeat 端口必须和 be.conf 中一致 mysql -uroot -P9030 -h127.0.0.1 -e ALTER SYSTEM ADD BACKEND 192.168.67.137:9050 # 再次查看 BE 状态此时就能看到输出了 mysql -uroot -P9030 -h127.0.0.1 -e SHOW BACKENDS4查看后端节点[rootbigdata137 ~]# mysql -uroot -P9030 -h127.0.0.1 -e SHOW BACKENDS -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | BackendId | Host | HeartbeatPort | BePort | HttpPort | BrpcPort | ArrowFlightSqlPort | LastStartTime | LastHeartbeat | Alive | SystemDecommissioned | TabletNum | DataUsedCapacity | TrashUsedCapacity | AvailCapacity | TotalCapacity | UsedPct | MaxDiskUsedPct | RemoteUsedCapacity | Tag | ErrMsg | Version | Status | HeartbeatFailureCounter | NodeRole | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 13197 | 192.168.67.137 | 9050 | 9060 | 8040 | 8060 | -1 | 2026-03-16 10:02:00 | 2026-03-16 10:07:19 | true | false | 0 | 0.000 | 0.000 | 4.174 GB | 26.986 GB | 84.53 % | 84.53 % | 0.000 | {location : default} | | doris-2.1.8-1-834d802457 | {lastSuccessReportTabletsTime:2026-03-16 10:07:23,lastStreamLoadTime:-1,isQueryDisabled:false,isLoadDisabled:false} | 0 | mix | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- [rootbigdata137 ~]#二Doris内部webUI1给Doris设置密码[rootbigdata137 src]# mysql -uroot -P9030 -h127.0.0.1 Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 21 Server version: 5.7.99 Doris version doris-2.1.8-1-834d802457 Copyright (c) 2000, 2025, Oracle and/or its affiliates. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type help; or \h for help. Type \c to clear the current input statement. mysql select user() - ; -------------------- | user() | -------------------- | root127.0.0.1 | -------------------- 1 row in set (0.09 sec) mysql set PASSWORD PASSWORD(root) - ; Query OK, 0 rows affected (0.02 sec) mysql2通过WebUI进行访问3集群搭建mysql show backends - ; -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | BackendId | Host | HeartbeatPort | BePort | HttpPort | BrpcPort | ArrowFlightSqlPort | LastStartTime | LastHeartbeat | Alive | SystemDecommissioned | TabletNum | DataUsedCapacity | TrashUsedCapacity | AvailCapacity | TotalCapacity | UsedPct | MaxDiskUsedPct | RemoteUsedCapacity | Tag | ErrMsg | Version | Status | HeartbeatFailureCounter | NodeRole | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 13197 | 192.168.67.137 | 9050 | 9060 | 8040 | 8060 | -1 | 2026-03-16 11:07:30 | 2026-03-16 11:09:20 | true | false | 22 | 0.000 | 0.000 | 4.167 GB | 26.986 GB | 84.56 % | 84.56 % | 0.000 | {location : default} | | doris-2.1.8-1-834d802457 | {lastSuccessReportTabletsTime:2026-03-16 11:08:56,lastStreamLoadTime:-1,isQueryDisabled:false,isLoadDisabled:false} | 0 | mix | | 14004 | 192.168.67.138 | 9050 | 9060 | 8040 | 8060 | -1 | 2026-03-16 11:07:04 | 2026-03-16 11:09:20 | true | false | 22 | 0.000 | 0.000 | 6.655 GB | 26.986 GB | 75.34 % | 75.34 % | 0.000 | {location : default} | | doris-2.1.8-1-834d802457 | {lastSuccessReportTabletsTime:2026-03-16 11:09:06,lastStreamLoadTime:-1,isQueryDisabled:false,isLoadDisabled:false} | 0 | mix | | 14005 | 192.168.67.139 | 9050 | 9060 | 8040 | 8060 | -1 | 2026-03-16 11:06:30 | 2026-03-16 11:09:20 | true | false | 22 | 0.000 | 0.000 | 6.652 GB | 26.986 GB | 75.35 % | 75.35 % | 0.000 | {location : default} | | doris-2.1.8-1-834d802457 | {lastSuccessReportTabletsTime:2026-03-16 11:09:05,lastStreamLoadTime:-1,isQueryDisabled:false,isLoadDisabled:false} | 0 | mix | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 3 rows in set (0.03 sec)将剩下两个节点的BE的conf文件修改为自己的ip地址启动之后在137的FE当中执行一下ALTER SYSTEM ADD BACKEND 192.168.67.138:9050; ALTER SYSTEM ADD BACKEND 192.168.67.139:9050;4查看效果mysql show backends - ; -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | BackendId | Host | HeartbeatPort | BePort | HttpPort | BrpcPort | ArrowFlightSqlPort | LastStartTime | LastHeartbeat | Alive | SystemDecommissioned | TabletNum | DataUsedCapacity | TrashUsedCapacity | AvailCapacity | TotalCapacity | UsedPct | MaxDiskUsedPct | RemoteUsedCapacity | Tag | ErrMsg | Version | Status | HeartbeatFailureCounter | NodeRole | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 13197 | 192.168.67.137 | 9050 | 9060 | 8040 | 8060 | -1 | 2026-03-16 11:07:30 | 2026-03-16 11:09:20 | true | false | 22 | 0.000 | 0.000 | 4.167 GB | 26.986 GB | 84.56 % | 84.56 % | 0.000 | {location : default} | | doris-2.1.8-1-834d802457 | {lastSuccessReportTabletsTime:2026-03-16 11:08:56,lastStreamLoadTime:-1,isQueryDisabled:false,isLoadDisabled:false} | 0 | mix | | 14004 | 192.168.67.138 | 9050 | 9060 | 8040 | 8060 | -1 | 2026-03-16 11:07:04 | 2026-03-16 11:09:20 | true | false | 22 | 0.000 | 0.000 | 6.655 GB | 26.986 GB | 75.34 % | 75.34 % | 0.000 | {location : default} | | doris-2.1.8-1-834d802457 | {lastSuccessReportTabletsTime:2026-03-16 11:09:06,lastStreamLoadTime:-1,isQueryDisabled:false,isLoadDisabled:false} | 0 | mix | | 14005 | 192.168.67.139 | 9050 | 9060 | 8040 | 8060 | -1 | 2026-03-16 11:06:30 | 2026-03-16 11:09:20 | true | false | 22 | 0.000 | 0.000 | 6.652 GB | 26.986 GB | 75.35 % | 75.35 % | 0.000 | {location : default} | | doris-2.1.8-1-834d802457 | {lastSuccessReportTabletsTime:2026-03-16 11:09:05,lastStreamLoadTime:-1,isQueryDisabled:false,isLoadDisabled:false} | 0 | mix | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 3 rows in set (0.03 sec)
Doris从入门到上天系列第二篇:Doris安装部署
一安装1下载安装包[rootbigdata137 src]# wget https://download.selectdb.com/apache-doris-2.1.8.1-bin-x64.tar.gz --2026-03-16 08:38:21-- https://download.selectdb.com/apache-doris-2.1.8.1-bin-x64.tar.gz Resolving download.selectdb.com (download.selectdb.com)... 121.29.38.253, 121.29.38.249, 121.29.38.248, ... Connecting to download.selectdb.com (download.selectdb.com)|121.29.38.253|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 2898376749 (2.7G) [application/gzip] Saving to: ‘apache-doris-2.1.8.1-bin-x64.tar.gz’ 100%[] 2,898,376,749 9.26MB/s in 5m 54s 2026-03-16 08:44:16 (7.80 MB/s) - ‘apache-doris-2.1.8.1-bin-x64.tar.gz’ saved [2898376749/2898376749] [rootbigdata137 src]#2修改环境变量1修改最大文件打开句柄数vi /etc/security/limits.conf * soft nofile 1000000 * hard nofile 10000002修改虚拟内存区域# 永久修改虚拟内存区域大小并立即生效# 永久修改虚拟内存区域大小并立即生效 cat /etc/sysctl.conf EOF vm.max_map_count 2000000 EOF # 使配置立即生效 sudo sysctl -p3安装FE1解压doris2配置FE的配置文件# 编辑 FE 配置文件 apache-doris/fe/conf/fe.conf修改以下参数JAVA_HOME/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.412.b08-1.el7_9.x86_64 priority_networks127.0.0.1/323启动BE[rootbigdata137 bin]# ./start_fe.sh --daemon[rootbigdata137 bin]# jps 71225 DorisFE 71982 Jps4集群中注册BE节点使用MySQL链接Doris[rootbigdata137 ~]# mysql -uroot -P9030 -h127.0.0.1 -e show frontends ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | Name | Host | EditLogPort | HttpPort | QueryPort | RpcPort | ArrowFlightSqlPort | Role | IsMaster | ClusterId | Join | Alive | ReplayedJournalId | LastStartTime | LastHeartbeat | IsHelper | ErrMsg | Version | CurrentConnected | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | fe_31bdc620_7fb1_4199_a2d2_815ea67ee05e | 192.168.67.137 | 9010 | 8030 | 9030 | 9020 | -1 | FOLLOWER | true | 1574010013 | true | true | 95 | 2026-03-16 09:50:59 | 2026-03-16 09:51:49 | true | | doris-2.1.8-1-834d802457 | Yes | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ [rootbigdata137 ~]# ^C [rootbigdata137 ~]#4安装BE1修改BE配置文件JAVA_HOME/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.412.b08-1.el7_9.x86_64 priority_networks192.168.67.137/322启动BE./start_be.sh --daemon3手动添加BE到FE登录到Doris客户端将BE添加到FE。# 执行添加 BE 命令9050 是 BE 默认的 heartbeat 端口必须和 be.conf 中一致 mysql -uroot -P9030 -h127.0.0.1 -e ALTER SYSTEM ADD BACKEND 192.168.67.137:9050 # 再次查看 BE 状态此时就能看到输出了 mysql -uroot -P9030 -h127.0.0.1 -e SHOW BACKENDS4查看后端节点[rootbigdata137 ~]# mysql -uroot -P9030 -h127.0.0.1 -e SHOW BACKENDS -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | BackendId | Host | HeartbeatPort | BePort | HttpPort | BrpcPort | ArrowFlightSqlPort | LastStartTime | LastHeartbeat | Alive | SystemDecommissioned | TabletNum | DataUsedCapacity | TrashUsedCapacity | AvailCapacity | TotalCapacity | UsedPct | MaxDiskUsedPct | RemoteUsedCapacity | Tag | ErrMsg | Version | Status | HeartbeatFailureCounter | NodeRole | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 13197 | 192.168.67.137 | 9050 | 9060 | 8040 | 8060 | -1 | 2026-03-16 10:02:00 | 2026-03-16 10:07:19 | true | false | 0 | 0.000 | 0.000 | 4.174 GB | 26.986 GB | 84.53 % | 84.53 % | 0.000 | {location : default} | | doris-2.1.8-1-834d802457 | {lastSuccessReportTabletsTime:2026-03-16 10:07:23,lastStreamLoadTime:-1,isQueryDisabled:false,isLoadDisabled:false} | 0 | mix | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- [rootbigdata137 ~]#二Doris内部webUI1给Doris设置密码[rootbigdata137 src]# mysql -uroot -P9030 -h127.0.0.1 Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 21 Server version: 5.7.99 Doris version doris-2.1.8-1-834d802457 Copyright (c) 2000, 2025, Oracle and/or its affiliates. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type help; or \h for help. Type \c to clear the current input statement. mysql select user() - ; -------------------- | user() | -------------------- | root127.0.0.1 | -------------------- 1 row in set (0.09 sec) mysql set PASSWORD PASSWORD(root) - ; Query OK, 0 rows affected (0.02 sec) mysql2通过WebUI进行访问3集群搭建mysql show backends - ; -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | BackendId | Host | HeartbeatPort | BePort | HttpPort | BrpcPort | ArrowFlightSqlPort | LastStartTime | LastHeartbeat | Alive | SystemDecommissioned | TabletNum | DataUsedCapacity | TrashUsedCapacity | AvailCapacity | TotalCapacity | UsedPct | MaxDiskUsedPct | RemoteUsedCapacity | Tag | ErrMsg | Version | Status | HeartbeatFailureCounter | NodeRole | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 13197 | 192.168.67.137 | 9050 | 9060 | 8040 | 8060 | -1 | 2026-03-16 11:07:30 | 2026-03-16 11:09:20 | true | false | 22 | 0.000 | 0.000 | 4.167 GB | 26.986 GB | 84.56 % | 84.56 % | 0.000 | {location : default} | | doris-2.1.8-1-834d802457 | {lastSuccessReportTabletsTime:2026-03-16 11:08:56,lastStreamLoadTime:-1,isQueryDisabled:false,isLoadDisabled:false} | 0 | mix | | 14004 | 192.168.67.138 | 9050 | 9060 | 8040 | 8060 | -1 | 2026-03-16 11:07:04 | 2026-03-16 11:09:20 | true | false | 22 | 0.000 | 0.000 | 6.655 GB | 26.986 GB | 75.34 % | 75.34 % | 0.000 | {location : default} | | doris-2.1.8-1-834d802457 | {lastSuccessReportTabletsTime:2026-03-16 11:09:06,lastStreamLoadTime:-1,isQueryDisabled:false,isLoadDisabled:false} | 0 | mix | | 14005 | 192.168.67.139 | 9050 | 9060 | 8040 | 8060 | -1 | 2026-03-16 11:06:30 | 2026-03-16 11:09:20 | true | false | 22 | 0.000 | 0.000 | 6.652 GB | 26.986 GB | 75.35 % | 75.35 % | 0.000 | {location : default} | | doris-2.1.8-1-834d802457 | {lastSuccessReportTabletsTime:2026-03-16 11:09:05,lastStreamLoadTime:-1,isQueryDisabled:false,isLoadDisabled:false} | 0 | mix | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 3 rows in set (0.03 sec)将剩下两个节点的BE的conf文件修改为自己的ip地址启动之后在137的FE当中执行一下ALTER SYSTEM ADD BACKEND 192.168.67.138:9050; ALTER SYSTEM ADD BACKEND 192.168.67.139:9050;4查看效果mysql show backends - ; -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | BackendId | Host | HeartbeatPort | BePort | HttpPort | BrpcPort | ArrowFlightSqlPort | LastStartTime | LastHeartbeat | Alive | SystemDecommissioned | TabletNum | DataUsedCapacity | TrashUsedCapacity | AvailCapacity | TotalCapacity | UsedPct | MaxDiskUsedPct | RemoteUsedCapacity | Tag | ErrMsg | Version | Status | HeartbeatFailureCounter | NodeRole | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 13197 | 192.168.67.137 | 9050 | 9060 | 8040 | 8060 | -1 | 2026-03-16 11:07:30 | 2026-03-16 11:09:20 | true | false | 22 | 0.000 | 0.000 | 4.167 GB | 26.986 GB | 84.56 % | 84.56 % | 0.000 | {location : default} | | doris-2.1.8-1-834d802457 | {lastSuccessReportTabletsTime:2026-03-16 11:08:56,lastStreamLoadTime:-1,isQueryDisabled:false,isLoadDisabled:false} | 0 | mix | | 14004 | 192.168.67.138 | 9050 | 9060 | 8040 | 8060 | -1 | 2026-03-16 11:07:04 | 2026-03-16 11:09:20 | true | false | 22 | 0.000 | 0.000 | 6.655 GB | 26.986 GB | 75.34 % | 75.34 % | 0.000 | {location : default} | | doris-2.1.8-1-834d802457 | {lastSuccessReportTabletsTime:2026-03-16 11:09:06,lastStreamLoadTime:-1,isQueryDisabled:false,isLoadDisabled:false} | 0 | mix | | 14005 | 192.168.67.139 | 9050 | 9060 | 8040 | 8060 | -1 | 2026-03-16 11:06:30 | 2026-03-16 11:09:20 | true | false | 22 | 0.000 | 0.000 | 6.652 GB | 26.986 GB | 75.35 % | 75.35 % | 0.000 | {location : default} | | doris-2.1.8-1-834d802457 | {lastSuccessReportTabletsTime:2026-03-16 11:09:05,lastStreamLoadTime:-1,isQueryDisabled:false,isLoadDisabled:false} | 0 | mix | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 3 rows in set (0.03 sec)