0%

ClickHouse安装

安装包

下载地址:https://packages.clickhouse.com/

安装

1
2
3
4
rpm -ivh clickhouse-common-static-22.10.2.11.x86_64.rpm
rpm -ivh clickhouse-common-static-dbg-22.10.2.11.x86_64.rpm
rpm -ivh clickhouse-client-22.10.2.11.x86_64.rpm
rpm -ivh clickhouse-server-22.10.2.11.x86_64.rpm

CentOS 7系统下,推荐使用如下命令管理clickhouse-server的启停及状态查看

1
2
3
systemctl start clickhouse-server
systemctl stop clickhouse-server
systemctl status clickhouse-server

ClickHouse的目录信息

1
2
3
4
5
6
7
8
9
10
# clickhouse-server的日志文件
/var/log/clickhouse-server/

# config.xml包含的是clickhouse全局的配置,users.xml包含用户相关的配置
/etc/clickhouse-server

# 里面有许多文件,主要关注 data 和 metadata
# data里面包含clickhouse的数据库
# metadata存放对应库表的元数据信息
/var/lib/clickhouse/