ClickHouse 搭建笔记

最近准备用ClickHouse,记录一下搭建记录,已经遇到的问题

1.检查一下是否支持SSE 4.2指令集

  grep -q sse4_2 /proc/cpuinfo && echo "SSE 4.2 supported" || echo "SSE 4.2 not supported"

如果输出结果如下,就表示可以了

SSE 4.2 supported

2.下载安装包

mwget http://repo.red-soft.biz/repos/clickhouse/stable/el7/clickhouse-client-1.1.54236-4.el7.x86_64.rpm
mwget http://repo.red-soft.biz/repos/clickhouse/stable/el7/clickhouse-compressor-1.1.54236-4.el7.x86_64.rpm
mwget http://repo.red-soft.biz/repos/clickhouse/stable/el7/clickhouse-debuginfo-1.1.54236-4.el7.x86_64.rpm
mwget http://repo.red-soft.biz/repos/clickhouse/stable/el7/clickhouse-server-1.1.54236-4.el7.x86_64.rpm
mwget http://repo.red-soft.biz/repos/clickhouse/stable/el7/clickhouse-server-common-1.1.54236-4.el7.x86_64.rpm

3.安装服务

rpm -ivh clickhouse-server-common-1.1.54236-4.el7.x86_64.rpm
rpm -ivh clickhouse-server-1.1.54236-4.el7.x86_64.rpm
rpm -ivh libtool-ltdl-2.4.2-21.el7_2.x86_64.rpm
rpm -ivh clickhouse-debuginfo-1.1.54236-4.el7.x86_64.rpm
rpm -ivh clickhouse-compressor-1.1.54236-4.el7.x86_64.rpm

4.启动服务器

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

5.启动客户端

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

6.使用

进入客户端之后就可以像使用Mysql一样用命令愉快的玩耍了

安装过程中碰到的问题

在安装 clickhouse-server-1.1.54236-4.el7.x86_64.rpm 的时候报错如下

error: Failed dependencies:
        libicudata.so.50()(64bit) is needed by clickhouse-server-1.1.54236-4.el7.x86_64
        libicui18n.so.50()(64bit) is needed by clickhouse-server-1.1.54236-4.el7.x86_64
        libicuuc.so.50()(64bit) is needed by clickhouse-server-1.1.54236-4.el7.x86_64
        libltdl.so.7()(64bit) is needed by clickhouse-server-1.1.54236-4.el7.x86_64
        libodbc.so.2()(64bit) is needed by clickhouse-server-1.1.54236-4.el7.x86_64

解决办法

yum install -y unixODBC 

在安装 clickhouse-server-1.1.54236-4.el7.x86_64.rpm 的时候报错如下

error: Failed dependencies:
    libicudata.so.50()(64bit) is needed by clickhouse-server-1.1.54236-4.el7.x86_64
    libicui18n.so.50()(64bit) is needed by clickhouse-server-1.1.54236-4.el7.x86_64
    libicuuc.so.50()(64bit) is needed by clickhouse-server-1.1.54236-4.el7.x86_64

解决办法

[root@localhost 7]# yum search libicu
[root@localhost 7]# yum install libicu.x86_64

你可能感兴趣的:(ClickHouse 搭建笔记)