先安装zookeeper集群。
安装简单理解配置需要仔细研究
4个节点每2主副本为一组分片
直接yum安装先安单机逐个安装
yum install yum-utils -y
rpm --import https://repo.clickhouse.com/CLICKHOUSE-KEY.GPG
yum-config-manager --add-repo https://repo.clickhouse.com/rpm/stable/x86_64
yum install clickhouse-server clickhouse-client -y
修改配置文件config.xml
#分布式互联地址(建议使用host配置集群域名)
<interserver_http_host>ch01</interserver_http_host>
#开通可以远程访问
<listen_host>0.0.0.0</listen_host>
#配置集群类型
##<tcfuture_cluster> 自定义的集群名字
##<internal_replication>true</internal_replication>开始副本复制
##一组<shard>表示一组分片,里面有几个<replica>表示有个副本
<tcfuture_cluster>
<shard>
<internal_replication>true</internal_replication>
<replica>
&l