[clickhouse] Install clickhouse on ubuntu20 and use DBeaver to remotely manage it

1.Installation

使用Deb安装包

// 添加证书
sudo apt-get install -y apt-transport-https ca-certificates dirmngr
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 8919F6BD2B48D754

// 更新软件源
echo "deb https://packages.clickhouse.com/deb stable main" | sudo tee \
    /etc/apt/sources.list.d/clickhouse.list
sudo apt-get update

// 下载ck
sudo apt-get install -y clickhouse-server clickhouse-client
# Enter password for default user: 123456    // 我的密码设为123456,初始用户default

// 启动ck
sudo service clickhouse-server start
clickhouse-client # or "clickhouse-client --password" 

Insert image description here

使用离线包

https://packages.clickhouse.com/deb/pool/main/c/clickhouse-server/

2.Configuration

  1. Run the external connection and uncomment this line
    Insert image description here

Insert image description here

  1. Restart service
sudo service clickhouse-server restart

3. External connection test

Enable DBeaver to manage ck

  1. Enter the remote host address, user name default, password 123456
  2. Click Test Connection to automatically download the driver for the first time
    Insert image description here
  3. Then it shows that the connection is successful
    Insert image description here

4. Related concepts

  1. The difference between clickhouse8123 and 9000 ports:
    1.1. 8123 port (HTTP port) [jdbc mode]:
    used to interact with the ClickHouse database through the HTTP protocol.
    Supports RESTful API and HTTP query syntax.
    You can use browsers, curl and other tools to send HTTP requests and receive responses.
    Usually used to execute queries, obtain data and manage ClickHouse clusters.
    1.2. Port 9000 (TCP port) [Interconnection of two machines]:
    used to interact with the ClickHouse database through the TCP/IP protocol.
    Communicates using ClickHouse custom binary protocol.
    Supports higher concurrency and performance.
    Usually used in high-performance scenarios such as large-scale data import, data writing, and data processing.

5.Reference

https://blog.csdn.net/qq_41990268/article/details/126737711

Guess you like

Origin blog.csdn.net/qq_45859826/article/details/132753085