linux下安装clickhouse
1.下载安装包
下载地址:https://packages.clickhouse.com/rpm/stable/
mkdir -p /apps/clickhouse
cd /apps/clickhouse
wget https://packages.clickhouse.com/rpm/stable/clickhouse-client-22.6.3.35.noarch.rpm
wget https://packages.clickhouse.com/rpm/stable/clickhouse-common-static-22.6.3.35.x86_64.rpm
wget https://packages.clickhouse.com/rpm/stable/clickhouse-server-22.6.3.35.noarch.rpm
wget https://packages.clickhouse.com/rpm/stable/clickhouse-common-static-dbg-22.6.3.35.x86_64.rpm
2.安装
rpm -ivh *.rpm
3.验证安装
rpm -qa | grep clickhouse
##出现以下内容代表安装成功##
clickhouse-server-22.6.3.35-1.noarch
clickhouse-client-22.6.3.35-1.noarch
clickhouse-common-static-dbg-22.6.3.35-1.x86_64
clickhouse-common-static-22.6.3.35-1.x86_64
4.创建用户
adduser clickhouse
usermod -a -G root clickhouse
5.修改配置文件
cd /etc/clickhouse-server/
vim config.xml
##放开注释##
<listen_host>::</listen_host>
6.启动clickhouse
sudo -u clickhouse /usr/bin/clickhouse-server --config=/etc/clickhouse-server/config.xml
7.用clickhouse-client连接
clickhouse-client -m
8.clickhouse官网文档