clickhouse 安装部署

一.下载 linux yum源安装

yum-config-manager --add-repo https://repo.yandex.ru/clickhouse/rpm/stable/x86_64

yum install clickhouse-server clickhouse-client

二.配置clickhouse 集群(分片多副本)

1. 修改 /etc/clickhouse/config.xml




trace
/var/log/clickhouse-server/clickhouse-server.log
/var/log/clickhouse-server/clickhouse-server.err.log
1000M
10







8123



9011



9004






/etc/clickhouse-server/server.crt
/etc/clickhouse-server/server.key

/etc/clickhouse-server/dhparam.pem
none
true
true
sslv2,sslv3
true


true
true
sslv2,sslv3
true



RejectCertificateHandler






9009









0.0.0.0










4096
3

100

0

0.9

4194304

0



8589934592

5368709120



/data/clickhouse/


/data/clickhouse/tmp/






/data/clickhouse/user_files/




/data/clickhouse/access/

users.xml

default



default

Asia/Shanghai



true






















3600


3600

60









system
query_log


toYYYYMM(event_date)


7500



system
trace_log

toYYYYMM(event_date)
7500



system
query_thread_log

toYYYYMM(event_date)
7500





system
metric_log

7500
1000



system
asynchronous_metric_log


60000








*_dictionary.xml







/clickhouse/task_queue/ddl











click_cost
any

0
3600


86400
60



max

0
60


3600
300


86400
3600







/data/clickhouse/format_schemas/









/etc/clickhouse-server/metrika.xml


2.修改/etc/clickhouse-server/metrika.xml








true

cdh01.dev.songguo7.com cdh01.dev.songguo7.com.ucb
9011





true


true
cdh02.dev.songguo7.com cdh02.dev.songguo7.com.ucb
9011








cdh01.dev.songguo7.com cdh01.dev.songguo7.com.ucb
2181


cdh02.dev.songguo7.com cdh02.dev.songguo7.com.ucb
2181


cdh03.dev.songguo7.com cdh03.dev.songguo7.com.ucb
2181




cluster_work

shard02

cdh02.dev.songguo7.com .ucb




10000000000
0.01
lz4




3.服务启停

service clickhouse-server stop ## 服务停止

service clickhouse-server start ## 服务启动

service clickhouse-server restart ## 服务重启

你可能感兴趣的:(大数据,clickhouse)