首页 > 系统服务 > 详细

Ubuntu下ClickHouse安装

时间:2017-07-05 20:49:40      阅读:1239      评论:0      收藏:0      [点我收藏+]

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

Ubuntu下ClickHouse安装

原文:http://www.cnblogs.com/cyq632694540/p/7123133.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!