ubuntu安装clickhouse

wget https://github.com/ClickHouse/ClickHouse/releases/download/v25.7.8.71-stable/clickhouse-server-25.7.8.71-amd64.tgz
tar zxvf clickhouse-server-25.7.8.71-amd64.tgz
clickhouse-server-25.7.8.71/install/doinst.sh
4、下载clickhouse-client包,然后解压运行脚本

wget https://github.com/ClickHouse/ClickHouse/releases/download/v25.7.8.71-stable/clickhouse-client-25.7.8.71-amd64.tgz
tar zxvf clickhouse-client-25.7.8.71-amd64.tgzclickhouse-client-25.7.8.71-amd64.tgz
clickhouse-client-25.7.8.71/install/doinst.sh

config1

<listen_host>0.0.0.0</listen_host>
<http_port>8123</http_port>
<tcp_port>9000</tcp_port>
/data/clickhouse/ch1/
<tmp_path>/data/clickhouse/ch1/tmp/</tmp_path>

<remote_servers>
<cluster_3s>
127.0.0.19000
127.0.0.19001
127.0.0.19002
</cluster_3s>
</remote_servers>




<max_memory_usage>10000000000</max_memory_usage>
<load_balancing>random</load_balancing>




::/0
default
default




3600
0




config2

<listen_host>0.0.0.0</listen_host>
<http_port>8124</http_port>
<tcp_port>9001</tcp_port>
/data/clickhouse/ch2/
<tmp_path>/data/clickhouse/ch2/tmp/</tmp_path>

<remote_servers>
<cluster_3s>
127.0.0.19000
127.0.0.19001
127.0.0.19002
</cluster_3s>
</remote_servers>



<max_memory_usage>10000000000</max_memory_usage>
<load_balancing>random</load_balancing>




::/0
default
default




3600
0




config3

<listen_host>0.0.0.0</listen_host>
<http_port>8125</http_port>
<tcp_port>9002</tcp_port>
/data/clickhouse/ch3/
<tmp_path>/data/clickhouse/ch3/tmp/</tmp_path>

<remote_servers>
<cluster_3s>
127.0.0.19000
127.0.0.19001
127.0.0.19002
</cluster_3s>
</remote_servers>



<max_memory_usage>10000000000</max_memory_usage>
<load_balancing>random</load_balancing>




::/0
default
default




3600
0




users.xml

10000000000 0 random





::/0

default
default




3600
0
0
<result_rows>0</result_rows>
<read_rows>0</read_rows>



mkdir -p /data/clickhouse/ch1/data /data/clickhouse/ch1/logs
mkdir -p /data/clickhouse/ch2/data /data/clickhouse/ch2/logs
mkdir -p /data/clickhouse/ch3/data /data/clickhouse/ch3/logs
chmod -R 777 /data/clickhouse
clickhouse-server --config-file=/etc/clickhouse-server/config-ch1.xml &
clickhouse-server --config-file=/etc/clickhouse-server/config-ch2.xml &
clickhouse-server --config-file=/etc/clickhouse-server/config-ch3.xml &

clickhouse-server --config-file=/etc/clickhouse-server/config-ch1.xml --daemon
clickhouse-server --config-file=/etc/clickhouse-server/config-ch2.xml --daemon
clickhouse-server --config-file=/etc/clickhouse-server/config-ch3.xml --daemon

users.xml

posted @ 2026-03-25 14:28  kevinWwm  阅读(31)  评论(0)    收藏  举报