三种方式:
(1)官网 http://doris.apache.org/master/zh-CN/downloads/downloads.html 官网上需要下载源码进行编译安装。
这个方式尝试了,编译遇到错误,解决错误很耗时。不推荐。
(2)直接下载编译后软件包 https://www.dorisdb.com/zh-CN/download/community
(3)到百度开源社区选择对应的版本,下载解压
https://palo-cloud-repo-bd.bd.bcebos.com/baidu-doris-release/DORIS-0.14.7-release-binary.tar.gz
(1)解压
[root@node3 opt]# tar -zxvf apache-doris_apache-doris-0.12.0-incubating-bin.tar.gz
(2)基本目录
[root@node3 opt]# cd apache-doris-0.12.0-incubating-bin/
[root@node3 apache-doris-0.12.0-incubating-bin]# ls
apache_hdfs_broker be fe LICENSE.txt NOTICE.txt quickstart README.md
[root@node3 apache-doris-0.12.0-incubating-bin]#
(3)启动FE
[root@node3 apache-doris-0.12.0-incubating-bin]# cd fe
[root@node3 fe]# pwd
/opt/apache-doris-0.12.0-incubating-bin/fe
[root@node3 fe]# mkdir doris-meta
[root@node3 fe]# sh bin/start_fe.sh --daemon
bin/start_fe.sh:行111: /opt/apache-doris-0.12.0-incubating-bin/fe/log/fe.out: 没有那个文件或目录
bin/start_fe.sh:行112: /opt/apache-doris-0.12.0-incubating-bin/fe/log/fe.out: 没有那个文件或目录
[root@node3 fe]# jps
11669 Jps
11481 PaloFe
30203 Elasticsearch
24141 JournalNode
23903 DataNode
[root@node3 fe]#
(4)查看fe.log日志,发现FE占用9030端口
2021-08-06 14:40:59,324 INFO 68 [Catalog.transferToMaster():1123] finish replay in 0 msec
2021-08-06 14:40:59,367 INFO 68 [Catalog.fixBugAfterMetadataReplayed():1191] start to fix meta data bug
2021-08-06 14:40:59,369 INFO 68 [Catalog.startMasterOnlyDaemonThreads():1202] checkpointer thread started. thread id is 70
2021-08-06 14:40:59,427 INFO 68 [Catalog.transferToMaster():1174] master finished to replay journal, can write now.
2021-08-06 14:40:59,427 INFO 68 [Catalog$4.runOneCycle():2355] finished to transfer FE type to MASTER
2021-08-06 14:40:59,427 INFO 68 [Catalog$4.runOneCycle():2269] begin to transfer FE type from MASTER to MASTER
2021-08-06 14:41:01,314 INFO 1 [Catalog.waitForReady():751] wait catalog to be ready. FE type: MASTER. is ready: true
2021-08-06 14:41:01,315 INFO 1 [Catalog.waitForReady():746] catalog is ready. FE type: MASTER
2021-08-06 14:41:01,491 INFO 1 [Xnio.<clinit>():95] XNIO version 3.6.5.Final
2021-08-06 14:41:01,514 INFO 1 [NioXnio.<clinit>():59] XNIO NIO Implementation Version 3.6.5.Final
2021-08-06 14:41:01,755 INFO 1 [FeServer.start():46] thrift server started.
2021-08-06 14:41:01,772 INFO 1 [NMysqlServer.start():71] Open mysql server success on 9030
2021-08-06 14:41:01,772 INFO 1 [QeService.start():60] QE service start.
2021-08-06 14:41:01,968 INFO 92 [HttpServer$HttpServerThread.run():210] HttpServer started with port 8030
2021-08-06 14:41:09,371 INFO 70 [BDBJEJournal.getFinalizedJournalId():409] database names: 1
2021-08-06 14:41:09,371 INFO 70 [Checkpoint.runAfterCatalogReady():81] checkpoint imageVersion 0, checkPointVersion 0
2021-08-06 14:41:09,408 INFO 24 [TabletScheduler.adjustPriorities():333] adjust priority for all tablets. changed: 0, total: 0
2021-08-06 14:41:09,408 INFO 25 [TabletChecker.checkTablets():303] finished to check tablets. unhealth/total/added/in_sched/not_ready: 0/0/0/0/0, cost: 0 ms
2021-08-06 14:41:09,416 INFO 21 [TabletStatMgr.runAfterCatalogReady():78] finished to get tablet stat of all backends. cost: 0 ms
2021-08-06 14:41:09,416 INFO 21 [TabletStatMgr.runAfterCatalogReady():122] finished to update index row num of all databases. cost: 0 ms
2021-08-06 14:41:09,417 INFO 25 [TabletChecker.runAfterCatalogReady():185] TStat :
(5)登录FE
参考官方文档
http://doris.apache.org/master/zh-CN/getting-started/basic-usage.html
使用MySQL客户端登录:mysql -h FE_HOST -P9030 -uroot
node3节点已经安装mysql客户端
[root@node3 fe]# mysql -h 10.17.12.160 -P 9030 -u root
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MySQL connection id is 0
Server version: 5.1.0
Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MySQL [(none)]> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
+--------------------+
1 row in set (0.02 sec)
MySQL [(none)]>
(6)添加BE
MySQL [(none)]> ALTER SYSTEM ADD BACKEND "node3:9050";
Query OK, 0 rows affected (0.03 sec)
MySQL [(none)]>
(1)创建存储目录
[root@node3 apache-doris-0.12.0-incubating-bin]# cd be
[root@node3 be]# mkdir storage
(2)启动BE
[root@node3 be]# sh bin/start_be.sh --daemon
(3)查看BE运行情况
MySQL [(none)]> SHOW PROC '/backends'\G
*************************** 1. row ***************************
BackendId: 10002
Cluster: default_cluster
IP: 10.17.12.160
HostName: node3
HeartbeatPort: 9050
BePort: 9060
HttpPort: 8040
BrpcPort: 8060
LastStartTime: 2021-08-06 15:18:07
LastHeartbeat: 2021-08-06 15:20:17
Alive: true
SystemDecommissioned: false
ClusterDecommissioned: false
TabletNum: 0
DataUsedCapacity: .000
AvailCapacity: 9.643 GB
TotalCapacity: 49.090 GB
UsedPct: 80.36 %
MaxDiskUsedPct: 80.36 %
ErrMsg:
Version: 0.12.0-rc03-Unknown
1 row in set (0.00 sec)
MySQL [(none)]>
isAlive 的值为true,运行正常。