首页 > 其他分享 >Apache-doris-2.1.7-安装体验

Apache-doris-2.1.7-安装体验

时间:2024-11-14 17:20:30浏览次数:1  
标签:none 127.0 0.1 node1 Apache 2.1 root doris

软件下载:https://apache-doris-releases.oss-accelerate.aliyuncs.com/apache-doris-2.1.7-bin-x64.tar.gz

安装配置jdk环境:

tar -zxvf jdk-8u202-linux-x64.tar.gz -C /usr/local/
tee -a /etc/profile <<EOF
export JAVA_HOME=/usr/local/jdk1.8.0_202
export PATH=\$PATH:\$JAVA_HOME/bin
EOF
source /etc/profile
java -version

解压doris软件:

tar -zxvf apache-doris-2.1.7-bin-x64.tar.gz -C /usr/local/

关闭swap和修改limits.conf

 tee -a /etc/security/limits.conf <<EOF
* soft nofile 65536
* hard nofile 65536
EOF
sysctl -p swapoff -a
sudo sed -i '/swap/s/^/#/' /etc/fstab

启动FE

[root@node1 fe]# ./bin/start_fe.sh --daemon
[root@node1 fe]# ps -ef | grep fe
root         66      2  0 Nov14 ?        00:00:00 [deferwq]
root       6659      1 99 01:05 pts/0    00:00:10 /usr/local/jdk1.8.0_202/bin/java -Dfile.encoding=UTF-8 -Djavax.security.auth.useSubjectCredsOnly=false -Xss4m -Xmx8192m -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:MaxGCPauseMillis=200 -XX:+PrintGCDateStamps -XX:+PrintGCDetails -Xloggc:/usr/local/apache-doris-2.1.7-bin-x64/fe/log/fe.gc.log.20241115-010527 -Dlog4j2.formatMsgNoLookups=true -XX:-OmitStackTraceInFastThrow -XX:OnOutOfMemoryError=kill -9 %p org.apache.doris.DorisFE
root       6867   2388  0 01:05 pts/0    00:00:00 grep --color=auto fe
[root@node1 fe]#    

启动BE

[root@node1 be]# ./bin/start_be.sh --daemon
Set max number of open file descriptors to a value greater than 60000.
Ask your system manager to modify /etc/security/limits.conf and append content like
  * soft nofile 655350
  * hard nofile 655350
and then run 'ulimit -n 655350' to take effect on current session.
[root@node1 be]# ulimit -n 655350
[root@node1 be]#
[root@node1 be]# ./bin/start_be.sh --daemon
[root@node1 be]#

连接FE需要使用mysql5.7客户端,只需要mysql客户端命令。

[root@node1 be]# mysql -uroot -P9030 -h127.0.0.1
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 0
Server version: 5.7.99

Copyright (c) 2000, 2022, 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.

['root'@127.0.0.1][(none)]>

注册BE到FE中

['root'@127.0.0.1][(none)]> ALTER SYSTEM ADD BACKEND "10.43.20.102:9050";
Query OK, 0 rows affected (0.09 sec)

['root'@127.0.0.1][(none)]>

查看BE,FE状态

['root'@127.0.0.1][(none)]> show proc '/frontends';
+-----------------------------------------+--------------+-------------+----------+-----------+---------+--------------------+----------+----------+------------+------+-------+-------------------+---------------------+---------------------+----------+--------+-----------------------------+------------------+
| Name                                    | Host         | EditLogPort | HttpPort | QueryPort | RpcPort | ArrowFlightSqlPort | Role     | IsMaster | ClusterId  | Join | Alive | ReplayedJournalId | LastStartTime       | LastHeartbeat       | IsHelper | ErrMsg | Version                     | CurrentConnected |
+-----------------------------------------+--------------+-------------+----------+-----------+---------+--------------------+----------+----------+------------+------+-------+-------------------+---------------------+---------------------+----------+--------+-----------------------------+------------------+
| fe_7dde06d2_96d7_4bcc_8c23_1d47da963ec1 | 10.43.20.102 | 9010        | 8030     | 9030      | 9020    | -1                 | FOLLOWER | true     | 1292288095 | true | true  | 129               | 2024-11-15 01:05:34 | 2024-11-15 01:13:15 | true     |        | doris-2.1.7-rc03-443e87e203 | Yes              |
+-----------------------------------------+--------------+-------------+----------+-----------+---------+--------------------+----------+----------+------------+------+-------+-------------------+---------------------+---------------------+----------+--------+-----------------------------+------------------+
1 row in set (0.14 sec)

['root'@127.0.0.1][(none)]> show proc '/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 |
+-----------+--------------+---------------+--------+----------+----------+--------------------+---------------------+---------------------+-------+----------------------+-----------+------------------+-------------------+---------------+---------------+---------+----------------+--------------------+--------------------------+--------+-----------------------------+-------------------------------------------------------------------------------------------------------------------------------+-------------------------+----------+
| 11072     | 10.43.20.102 | 9050          | 9060   | 8040     | 8060     | -1                 | 2024-11-15 01:07:15 | 2024-11-15 01:13:35 | true  | false                | 22        | 0.000            | 0.000             | 29.980 GB     | 45.775 GB     | 34.51 % | 34.51 %        | 0.000              | {"location" : "default"} |        | doris-2.1.7-rc03-443e87e203 | {"lastSuccessReportTabletsTime":"2024-11-15 01:12:52","lastStreamLoadTime":-1,"isQueryDisabled":false,"isLoadDisabled":false} | 0                       | mix      |
+-----------+--------------+---------------+--------+----------+----------+--------------------+---------------------+---------------------+-------+----------------------+-----------+------------------+-------------------+---------------+---------------+---------+----------------+--------------------+--------------------------+--------+-----------------------------+-------------------------------------------------------------------------------------------------------------------------------+-------------------------+----------+
1 row in set (0.00 sec)

搭建完成,修改连接密码:

['root'@127.0.0.1][(none)]> SET PASSWORD FOR 'root' = PASSWORD('doris-root-password');
Query OK, 0 rows affected (0.03 sec)

['root'@127.0.0.1][(none)]> SET PASSWORD FOR 'admin' = PASSWORD('doris-admin-password');
Query OK, 0 rows affected (0.00 sec)

创建数据库和表信息:

使用admin用户连接

[root@node1 be]# mysql -uadmin -P9030 -h127.0.0.1
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.7.99 Doris version doris-2.1.7-rc03-443e87e203

Copyright (c) 2000, 2022, 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.

['admin'@127.0.0.1][(none)]> create database demo;
    k3 CHAR(10) COMMENT "string column",
    k4 INT NOT NULL DEFAULT "1" COMMENT "int column"
)
COMMENT "my first table"
DISTRIBUTED BY HASH(k1) BUCKETS 1
PROPERTIES ('replication_num' = '1');Query OK, 0 rows affected (0.01 sec)

['admin'@127.0.0.1][(none)]>
['admin'@127.0.0.1][(none)]> use demo;
Database changed
['admin'@127.0.0.1][demo]> create table mytable
    -> (
    ->     k1 TINYINT,
    ->     k2 DECIMAL(10, 2) DEFAULT "10.05",
    ->     k3 CHAR(10) COMMENT "string column",
    ->     k4 INT NOT NULL DEFAULT "1" COMMENT "int column"
    -> )
    -> COMMENT "my first table"
    -> DISTRIBUTED BY HASH(k1) BUCKETS 1
    -> PROPERTIES ('replication_num' = '1');
Query OK, 0 rows affected (0.02 sec)

创建语句:
create database demo;
use demo;
create table mytable
    (
         k1 TINYINT,
         k2 DECIMAL(10, 2) DEFAULT "10.05",
         k3 CHAR(10) COMMENT "string column",
         k4 INT NOT NULL DEFAULT "1" COMMENT "int column"
     )
     COMMENT "my first table"
     DISTRIBUTED BY HASH(k1) BUCKETS 1
     PROPERTIES ('replication_num' = '1');

构造导入数据

tee -a data.csv <<EOF
1,0.14,a1,20
2,1.04,b2,21
3,3.14,c3,22
4,4.35,d4,23
EOF

导入数据成功:

[root@node1 be]# curl  --location-trusted -u admin:doris-admin-password -T data.csv -H "column_separator:," http://127.0.0.1:8030/api/demo/mytable/_stream_load
{
    "TxnId": 3,
    "Label": "508a19a6-d202-468e-a24e-8cc63a6e4891",
    "Comment": "",
    "TwoPhaseCommit": "false",
    "Status": "Success",
    "Message": "OK",
    "NumberTotalRows": 4,
    "NumberLoadedRows": 4,
    "NumberFilteredRows": 0,
    "NumberUnselectedRows": 0,
    "LoadBytes": 52,
    "LoadTimeMs": 463,
    "BeginTxnTimeMs": 37,
    "StreamLoadPutTimeMs": 302,
    "ReadDataTimeMs": 0,
    "WriteDataTimeMs": 74,
    "ReceiveDataTimeMs": 344,
    "CommitAndPublishTimeMs": 46
}
[root@node1 be]#

 参考连接:https://doris.apache.org/docs/gettingStarted/quick-start/

标签:none,127.0,0.1,node1,Apache,2.1,root,doris
From: https://www.cnblogs.com/elanjie/p/18546446

相关文章

  • Ubuntu 22.04 LTS 离线安装 Harbor v2.11 (附https认证,Trivy镜像扫描)
    Harbor介绍Harbor是一个开源的企业级DockerRegistry服务,它提供了一个安全、可信赖的仓库来存储和管理Docker镜像。Harbor翻译为中文名称为"庇护;居住;"。可以理解为是Docker镜像的"居住环境"或者是镜像的"庇护所"。Harbor最初由VMware公司开发,旨在解决企业级Docker镜像管理的......
  • Dockerfile构建镜像(练习一Apache镜像)(5-1)
    目录指令详解本章实例:1.创建工作目录2.在工作目录中创建并编写Dockerfile文件(1)保证拥有centos基础镜像3.编写相关执行脚本##添加启动镜像启动执行脚本#设置centos.repo仓库文件Docker主机需要搭建yum仓库4.使用Dockerfile生成镜像 5.使用新镜像运行容器测试#查......
  • web服务器Apache与Nginx的优缺点?
    Apache是一个开放源代码的Web服务器软件,它能够运行在几乎所有主流的操作系统上,包括Unix、Linux、Windows、MacOS等。ApacheHTTP服务器是世界上最流行的Web服务器之一,它由Apache软件基金会维护和支持。Apache提供了强大的功能,包括:可配置性:用户可以通过配置文件来......
  • apachectl——Apache服务器前端控制工具
    转自于:https://github.com/jaywcjlove/linux-command,后不赘述apachectlApache服务器前端控制工具补充说明apachectl命令是Apache的Web服务器前端控制工具,用以启动、关闭和重新启动Web服务器进程。语法apachectl(参数)参数configtest:检查设置文件中的语法是否正确;ful......
  • http://192.168.1.1/ http://3232235777/
    提供的两个链接分别是:http://192.168.1.1/http://3232235777/1. http://192.168.1.1/ ——IP地址表示法(点分十进制)这是一个典型的IPv4地址,表示一个私有局域网(LAN)地址。IPv4地址由四个字节(32位)组成,每个字节的范围是从0到255。表示方法是将每个字节用点(.)分隔开,并使......
  • 2.1_1进程的概念、组成和特征
    目录1、进程(进程实体)的概念2、进程的组成PCB进程描述信息资源分配进程控制和管理信息处理机相关信息程序段数据段3、进程的特征学习目标:概念:理解“进程“和"程序"的区别组成:一个进程由哪些部分组成进程的特征:进程有哪些重要的特征1、进程(进程实体)的概念程序:......
  • Apache Spark 学习路径
    文章目录一、基础知识1.1大数据概念1.2Spark介绍1.3Spark架构二、安装与配置三、编程模型四、核心API4.1、SparkSQL4.2SparkStreaming4.3MLlib4.4GraphX五、Spark机制5.1性能调优5.2Spark内部机制5.3Spark生态系统5.4实战与案例六、深入理解Spark架构七......
  • CC-ADMIN后台简介一个基于 Spring Boot 2.1.3 、SpringBootMybatis plus、JWT、Shiro
    说明此文章为转发的,方便日后查看。系统演示环境http://www.cc-admin.top/#/home简介CC-ADMIN前端简介现在市面的上后台管理系统很多,不差你这一个,为啥又来个轮子?答:材料不一样。本轮子的选材是在考察过antv、element之后选择了quasar,前两个很优秀,尤其是antv的外观我特......
  • PHP与Apache、Nginx的性能对比与优化技巧
    PHP与Apache、Nginx的性能对比与优化技巧在现代web开发中,PHP作为一种常见的服务器端脚本语言,通常需要与Web服务器(如Apache和Nginx)配合使用。Apache与Nginx各自的架构特点和性能表现有很大的不同,因此在PHP应用的部署过程中,选择合适的Web服务器并对其进行优化至关重要。Apache与N......
  • Apache DolphinScheduler将上游Task执行结果传递给下游
    01背景公司的数据开发平台需要用到DolphinScheduler做任务调度,其中一个场景是:上游任务执行结束后,需要将任务执行结果传递给下游任务。DolphinScheduler肯定是能实现任务之间的传参的,具体的可以看:DolphinScheduler|文档中心(https://dolphinscheduler.apache.org/zh-cn/docs/......