准备一台CentOS7的服务器

1.先添加官方仓库

sudo yum install yum-utils
sudo rpm --import https://repo.clickhouse.tech/CLICKHOUSE-KEY.GPG
sudo yum-config-manager --add-repo https://repo.clickhouse.tech/rpm/stable/x86_64
2.安装server和client

sudo yum install clickhouse-server clickhouse-client
3.启动服务

sudo systemctl start clickhouse-server.service

4.配置文件位置

/etc/clickhouse-server/config.xml

默认的配置文件配置的log地址为        <log>/var/log/clickhouse-server/clickhouse-server.log</log>

连接clickhouse,默认可以使用default用户无密码登录

[root@htyy96 clickhouse-server]# clickhouse-client
ClickHouse client version 21.2.4.6 (official build).
Connecting to localhost:9000 as user default.
Connected to ClickHouse server version 21.2.4 revision 54447.

htyy96 :)