clickhouse学习笔记
2021/6/14 18:22:35
本文主要是介绍clickhouse学习笔记,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
ClickHouse
# 中文文档 https://clickhouse.tech/docs/zh/ # 中文pdf文档,可自行下载 https://clickhouse.tech/docs/zh/single/clickhouse_zh.pdf
一 安装
1 rpm包安装
Linux系统: CentOS 7.6
1.1 添加官方存储库
# yum-utils安装,yum管理包 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 # 显示:Init script is already running # 使用客户端连接 clickhouse-client # 连接拒绝:DB::NetException: Connection refused (localhost:9000)
1.4 解决连接不了的问题
# 查看服务是否启动,发现无服务 ps -ef | grep clickhouse-server # 使用systemctl启动服务 systemctl start clickhouse-server.service # 或者 sudo service clickhouse-server.service start # 服务启动后连接localhoust:9000正常 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 ssl认证 <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 <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设置 <zookeeper> # 最大会话超时时间 <max_session_timeout>3600</max_session_timeout>
这篇关于clickhouse学习笔记的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-10-04el-table 开启定时器下,表格的选中状态会消失是什么原因-icode9专业技术文章分享
- 2024-10-03如何安装和初始化飞牛私有云 fnOS?-icode9专业技术文章分享
- 2024-10-03如何安装 App 并连接到飞牛 NAS?-icode9专业技术文章分享
- 2024-10-03如何安装飞牛 TV 并连接到影视服务器?-icode9专业技术文章分享
- 2024-10-03如何在PVE和ESXI上安装飞牛私有云 fnOS?-icode9专业技术文章分享
- 2024-10-03fnOS国产最强NAS安装系统异常情况处理-icode9专业技术文章分享
- 2024-10-03飞牛NAS如何创建存储空间?-icode9专业技术文章分享
- 2024-10-03fnOS国产最强NAS硬盘会自动休眠吗?-icode9专业技术文章分享
- 2024-10-03fnOS国产最强NAS如何安装飞牛影视和创建媒体库?-icode9专业技术文章分享
- 2024-10-03fnOS国产最强NAS如何为家人朋友开通影视账号?-icode9专业技术文章分享