Ubuntu下ClickHouse安装

ClickHouse目前仅支持在ubuntu下面部署,而且国内中国文档也比较少

>vi /etc/apt/sources.list

#在最后一行追加

#ubuntu16.04 使用Xenial:

deb http://repo.yandex.ru/clickhouse/xenial stable main  

#ubuntu14.04 使用Trusty:

deb http://repo.yandex.ru/clickhouse/Trusty stable main  

#ubuntu12.04 使用Precise:

deb http://repo.yandex.ru/clickhouse/Precise stable main  

保存退出

>apt-key adv --keyserver keyserver.ubuntu.com --recv E0C56BD4  //追加key

>apt-get update

>apt-get install clickhouse-server-common clickhouse-client -y

>service clickhouse-server start

此时如果clickhouse-server启动不了

>tail -10 /var/log/clickhouse-server/clickhouse-server.log //查看错误日志是什么回事,发现9000端口已被占用

解决:

>vi /etc/clickhouse-server/config.xml 

#找到<tcp_port>9000</tcp_port>  把9000改为其他端口如:9001

#还有一个问题就是ipv4和ipv6的问题,如果服务器不支持ipv6,那么把listen_host冒号去掉改为自己的IP地址,或0.0.0.0表示所有ip都能接入

#再次启动clickhouse

>service clickhouse-server restart 

>clickhouse-client --port=9001  #指定连接的端口进入

clickhouse的SQL命令与Mysql是大同小异的,具体可以参照官方文档 https://clickhouse.yandex/docs/en/single/index.html#create-table

 

 

2019-08-21 附加:https://www.cnblogs.com/cyq632694540/p/11041506.html   使用docker安装ClickHouse~方便又快捷

转载于:https://www.cnblogs.com/cyq632694540/p/7123133.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值