Skip to content

Debian 12 安装 ClickHouse

Published: at 02:30 AM

配置 Debian 仓库

sudo apt-get install -y apt-transport-https ca-certificates curl gnupg
curl -fsSL 'https://packages.clickhouse.com/rpm/lts/repodata/repomd.xml.key' | sudo gpg --dearmor -o /usr/share/keyrings/clickhouse-keyring.gpg

echo "deb [signed-by=/usr/share/keyrings/clickhouse-keyring.gpg] https://packages.clickhouse.com/deb stable main" | sudo tee \
    /etc/apt/sources.list.d/clickhouse.list
sudo apt-get update

安装 ClickHouse 服务端&客户端

sudo apt-get install -y clickhouse-server clickhouse-client

启动 ClickHouse 服务

sudo service clickhouse-server start

客户端登录验证

clickhouse-client # 输入刚刚设置的密码


:) select version();

SELECT version()

Query id: 00b164f0-3da0-4cc5-a83c-879a179aa515

   ┌─version()───┐
1. 24.5.1.1763
   └─────────────┘

1 row in set. Elapsed: 0.003 sec.

参考