clickhouse在linux上的安装和配置

yum install -y curl
curl -s https://packagecloud.io/install/repositories/altinity/clickhouse/script.rpm.sh | sudo bash

yum list 'clickhouse*'yum list 'clickhouse*'
yum install -y clickhouse-server clickhouse-client

yum list installed 'clickhouse*'

wget --content-disposition https://packagecloud.io/Altinity/clickhouse/packages/el/6/clickhouse-server-common-19.3.6-1.el6.x86_64.rpm/download.rpm
wget --content-disposition https://packagecloud.io/Altinity/clickhouse/packages/el/6/clickhouse-server-19.3.6-1.el6.x86_64.rpm/download.rpm
wget --content-disposition https://packagecloud.io/Altinity/clickhouse/packages/el/6/clickhouse-common-static-19.3.6-1.el6.x86_64.rpm/download.rpm
wget --content-disposition https://packagecloud.io/Altinity/clickhouse/packages/el/6/clickhouse-client-19.3.6-1.el6.x86_64.rpm/download.rpm

yum install clickhouse-*

vim /etc/clickhouse-server/config.xml

修改log路径

<log>/data/clickhouse/log/clickhouse-server/clickhouse-server.log</log>
<errorlog>/data/clickhouse/log/clickhouse-server/clickhouse-server.err.log</errorlog>

修改数据路径

<!-- Path to data directory, with trailing slash. -->
<path>/data/clickhouse/</path>

<!-- Path to temporary data for processing hard queries. -->
<tmp_path>/data/clickhouse/tmp/</tmp_path>

<!-- Directory with user provided files that are accessible by 'file' table function. -->
<user_files_path>/data/clickhouse/user_files/</user_files_path>

运行服务

service clickhouse-server start

在控制台中直接启动服务:

clickhouse-server --config-file=/etc/clickhouse-server/config.xml

客户端连接服务

clickhouse-client


默认情况下它使用‘default’用户无密码的与localhost:9000服务建立连接。 客户端也可以用于连接远程服务,例如:

clickhouse-client --host=example.com


clickhouse 开启运程访问
vim  /etc/clickhouse-server/config.xml

把注释掉的<listen_host>::</listen_host>取消注释,然后重启服务:

systemctl restart clickhouse-server 
posted @   哈喽哈喽111111  阅读(239)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 分享4款.NET开源、免费、实用的商城系统
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
· 上周热点回顾(2.24-3.2)
历史上的今天:
2021-11-24 Shell脚本中判断字符串是否被包含在内并且使用grep 精确匹配
2021-11-24 获取Docker容器名称和ID
2021-11-24 K8s deployments的故障排查可视化指南已更新(2021 中文版)
2021-11-24 shell分割字符串并赋值给变量
点击右上角即可分享
微信分享提示