Get the App
SLTechnology News&Howtos  ›  Development  › 

How to deploy clickhouse using docker-compose

Shulou Source: shulou.com Published: 2022-06-02 13:45:38 10月18日 Update

This article mainly introduces how to use docker-compose to deploy clickhouse, the article is very detailed, has a certain reference value, interested friends must read it!

ClickHouse is an open source column-oriented DBMS (developed by Yandex). The working speed of ClickHouse is 10-1000 times faster than that of traditional methods. It is suitable for big data, business analysis and time series data. ClickHouse is the first open source SQL data warehouse that matches the performance, maturity, and scalability of proprietary databases such as Sybase IQ, Vertica, and Snowflake.

In this little tutorial, I'll show you how to install ClickHouse with minimal settings.

For this tutorial, we need to install Docker and docker-compose.

First, you need to create a directory in which to create the necessary files and directories.

Cd / home/edymkdir my-clickhousecd my-clickhouse

Then you need to create a directory in which the ClickHouse data will be stored.

Mkdir db

The final step is to create the docker-compose.yml file.

Version:'3' services: ch_server: image: yandex/clickhouse-server ports:-"8123 image" volumes: -. / db:/var/lib/clickhouse networks:-ch_ntw ch_client: image: yandex/clickhouse-client entrypoint:-/ bin/sleep command:-infinity networks:-ch_ntw networks: ch_ntw: driver : bridge ipam: config:-subnet: 10.222.1.0 Universe 24

Let's check what we have done. A file (docker-compose.yml) and a directory (db)

Ls-la drwxr-xr-x 3 user user 4096 Mar 4 07:44. Drwxr-xr-x 4 user user 4096 Mar 4 07:43.. drwxr-xr-x 3 user user 4096 Mar 4 07:45 db-rw-r--r-- 1 user user 435 Mar 4 07:46 docker-compose.yml

okay!

Now let's start our Clickhouse server. The ClickHouse image will download itself and start the process.

Sudo docker-compose up-d

Now let's open the command line.

Sudo docker-compose exec ch_server clickhouse-client

We should see the result of running ClickHouse.

ClickHouse client version 21.2.5.5 (official build). Connecting to localhost:9000 as user default.Connected to ClickHouse server version 21.2.5 revision 54447. 5175e561dffd:)

Congratulations on the successful installation of ClickHouse.

These are all the contents of the article "how to deploy clickhouse using docker-compose". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Tags: Data catalogs files content tutorials articles necessary successful mature business warehouse value tradition interest extensibility commands images guys buddies that is Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information vpn MariaDB Redmi NVidia