ClickHouse
# 中文文档
https://clickhouse.tech/docs/zh/
# 中文pdf文档,可自行下载
https://clickhouse.tech/docs/zh/single/clickhouse_zh.pdf
一 安装
1 rpm包安装
Linux系统: CentOS 7.6
1.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
1.2 安装服务端与客户端
sudo yum install clickhouse-server clickhouse-client
1.3 按文档启动连接
sudo /etc/init.d/clickhouse-server start
clickhouse-client
1.4 解决连接不了的问题
ps -ef | grep clickhouse-server
systemctl start clickhouse-server.service
sudo service clickhouse-server.service start
clickhouse-client
2 集群部署
待补充
二 配置文件
1 配置文件位置
/etc/clickhouse-server/config.xml
/etc/clickhouse-server/users.xml
2 部分配置(可能理解有误)
/var/log/clickhouse-server/clickhouse-server.log
/var/log/clickhouse-server/clickhouse-server.err.log
<tcp_port>9000</tcp_port>
<interserver_http_credentials>
<user>interserver</user>
<password></password>
</interserver_http_credentials>
<listen_host>::1</listen_host>
<listen_host>127.0.0.1</listen_host>
<max_connections>4096</max_connections>
<keep_alive_timeout>3</keep_alive_timeout>
<grpc>
<enable_ssl>false</enable_ssl>
...
</grpc>
<max_send_message_size>-1</max_send_message_size>
<max_receive_message_size>-1</max_receive_message_size>
<openSSL>
<max_concurrent_queries>100</max_concurrent_queries>
<max_server_memory_usage>0</max_server_memory_usage>
<!-- <max_open_files>262144</max_open_files> -->
<path>/var/lib/clickhouse/</path>
<remote_servers>
<zookeeper>
<max_session_timeout>3600</max_session_timeout>