debian 10 安装_如何在Debian 10上安装和使用ClickHouse

debian 10 安装

介绍 (Introduction)

ClickHouse is an open-source, column-oriented analytics database created by Yandex for OLAP and big data use cases. ClickHouse’s support for real-time query processing makes it suitable for applications that require sub-second analytical results. ClickHouse’s query language is a dialect of SQL that enables powerful declarative querying capabilities while offering familiarity and a smaller learning curve for the end user.

ClickHouseYandexOLAP和大数据使用案例创建的开源,面向列的分析数据库。 ClickHouse对实时查询处理的支持使其适合需要亚秒级分析结果的应用程序。 ClickHouse的查询语言是SQL的一种方言,可启用强大的声明性查询功能,同时为最终用户提供熟悉程度和较小的学习曲线。

Column-oriented databases store records in blocks grouped by columns instead of rows. By not loading data for columns absent in the query, column-oriented databases spend less time reading data while completing queries. As a result, these databases can compute and return results much faster than traditional row-based systems for certain workloads, such as OLAP.

面向列的数据库将记录存储在按列而不是行分组的块中。 通过不加载查询中不存在的列的数据,面向列的数据库在完成查询时花费更少的时间读取数据。 因此,对于某些工作负载(例如OLAP),这些数据库可以比传统的基于行的系统更快地计算和返回结果。

Online Analytics Processing (OLAP) systems allow for organizing large amounts of data and performing complex queries. They are capable of managing petabytes of data and returning query results quickly. In this way, OLAP is useful for work in areas like data science and business analytics.

在线分析处理 (OLAP)系统允许组织大量数据并执行复杂的查询。 它们能够管理PB级数据并快速返回查询结果。 这样,OLAP可用于数据科学和业务分析等领域的工作。

In this tutorial, you’ll install the ClickHouse database server and client on your machine. You’ll use the DBMS for typical tasks and optionally enable remote access from another server so that you’ll be able to connect to the database from another machine. Then you’ll test ClickHouse by modeling and querying example website-visit data.

在本教程中,您将在计算机上安装ClickHouse数据库服务器和客户端。 您将使用DBMS执行典型的任务,并有选择地启用来自另一台服务器的远程访问,以便能够从另一台计算机连接到数据库。 然后,您将通过建模和查询示例网站访问数据来测试ClickHouse。

先决条件 (Prerequisites)

  • One Debian 10 with a sudo enabled non-root user and firewall setup. You can follow the initial server setup tutorial to create the user and set up the firewall.

    一台启用了sudo Debian 10启用了非root用户和防火墙设置。 您可以按照初始服务器设置教程来创建用户并设置防火墙。

  • (Optional) A secondary Debian 10 with a sudo enabled non-root user and firewall setup. You can follow the initial server setup tutorial.

    (可选)具有启用了sudo非Debian用户和防火墙设置的辅助Debian 10。 您可以按照初始服务器设置教程进行操作

第1步-安装ClickHouse (Step 1 — Installing ClickHouse)

In this section, you will install the ClickHouse server and client programs using apt.

在本节中,您将使用apt安装ClickHouse服务器和客户端程序。

First, SSH into your server by running:

首先,通过运行SSH进入服务器:

  • ssh sammy@your_server_ip

    ssh sammy @ your_server_ip

dirmngr is a server for managing certificates and keys. It is required for adding and verifying remote repository keys, install it by running:

dirmngr是用于管理证书和密钥的服务器。 添加和验证远程存储库密钥是必需的,请通过运行以下命令进行安装:

  • sudo apt install dirmngr

    须藤apt install dirmngr

Yandex maintains an APT repository that has the latest version of ClickHouse. Add the repository’s GPG key so that you’ll be able to securely download validated ClickHouse packages:

Yandex维护一个具有最新版本的ClickHouse的APT存储库。 添加存储库的GPG密钥,以便您可以安全地下载经过验证的ClickHouse软件包:

  • sudo apt-key adv --keyserver keyserver.ubuntu.com --recv E0C56BD4

    须藤apt-key adv --keyserver keyserver.ubuntu.com --recv E0C56BD4

You will see output similar to the following:

您将看到类似于以下内容的输出:


   
   
   
Output
Executing: /tmp/apt-key-gpghome.JkkcKnBAFY/gpg.1.sh --keyserver keyserver.ubuntu.com --recv E0C56BD4 gpg: key C8F1E19FE0C56BD4: public key "ClickHouse Repository Key <milovidov@yandex-team.ru>" imported gpg: Total number processed: 1 gpg: imported: 1

The output confirms it has successfully verified and added the key.

输出确认已成功验证并添加了密钥。

Add the repository to your APT repositories list by executing:

通过执行以下操作,将存储库添加到您的APT存储库列表中:

  • echo "deb http://repo.yandex.ru/clickhouse/deb/stable/ main/" | sudo tee /etc/apt/sources.list.d/clickhouse.list

    回声“ deb http://repo.yandex.ru/clickhouse/deb/stable/ main /” | sudo tee /etc/apt/sources.list.d/clickhouse.list

Here you’ve piped the output of echo to sudo tee so that this output can print to a root-owned file.

在这里,您已将echo的输出通过管道传递到sudo tee以便此输出可以打印到根拥有的文件。

Now, run apt update to update your packages:

现在,运行apt update来更新您的软件包:

  • sudo apt update

    sudo apt更新

The clickhouse-server and clickhouse-client packages will now be available for installation.

clickhouse-serverclickhouse-client软件包现在将可用于安装。

As of ClickHouse version 19.13.3, certain OpenSSL 1.1.1 configurations such as MinProtocol and CipherVersion are not read correctly. In order to workaround this incompatibility, modify the OpenSSL config file and comment out the ssl_conf = ssl_sect line in /etc/ssl/openssl.cnf.

从ClickHouse版本19.13.3开始,某些OpenSSL 1.1.1配置(例如MinProtocol和CipherVersion)无法正确读取。 为了解决此不兼容问题,请修改OpenSSL配置文件,并在/etc/ssl/openssl.cnf ssl_conf = ssl_sect行。

Edit the configuration file by executing:

通过执行以下操作来编辑配置文件:

  • sudo nano /etc/ssl/openssl.cnf

    须藤nano /etc/ssl/openssl.cnf

Then comment out the line containing ssl_conf = ssl_sect, so it looks like the following file:

然后注释掉包含ssl_conf = ssl_sect的行,因此它看起来像以下文件:

/etc/ssl/openssl.cnf
/etc/ssl/openssl.cnf
...

tsa_name        = yes   # Must the TSA name be included in the reply?
                # (optional, default: no)
ess_cert_id_chain   = no    # Must the ESS cert id chain be included?
                # (optional, default: no)
ess_cert_id_alg     = sha1  # algorithm to compute certificate
                # identifier (optional, default: sha1)
[default_conf]
#ssl_conf = ssl_sect

[ssl_sect]
...

Now that the OpenSSL config has been patched, you’re ready to install the ClickHouse server and client packages. Install them with:

既然已经修补了OpenSSL配置,那么您就可以安装ClickHouse服务器和客户端软件包了。 通过以下方式安装它们:

  • sudo apt install clickhouse-server clickhouse-client

    sudo apt安装clickhouse-server clickhouse-client

During the installation, you will be asked to set a password for the default ClickHouse user.

在安装过程中,系统将要求您为

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值