博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
clickhouse部署(centos6.9和ubuntu 14.04)
阅读量:6477 次
发布时间:2019-06-23

本文共 2947 字,大约阅读时间需要 9 分钟。

一、在CentOS上部署clickhouse

1、安装源
[root@mcddmpdsvm ~]# vim /etc/yum.repos.d/clickhouse-el6.repo
[clickhouse]
name=Yandex Clickhouse packages built by Red Soft
baseurl=
enabled=1
gpgcheck=0
metadata_expire=1m

2、安装clickhouse

yum install clickhouse-server clickhouse-client clickhouse-server-common clickhouse-compressor
报错:
Error: Package: clickhouse-server-1.1.54236-4.el6.x86_64 (clickhouse)
Requires: libbfd-2.20.51.0.2-5.44.el6.so()(64bit)
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest

3、解决办法,更换binutils版本5.43->>5.44

rpm -e binutils-2.20.51.0.2-5.43.el6.x86_64
wget ftp://ftp.pbone.net/mirror/ftp.scientificlinux.org/linux/scientific/6.8/x86_64/os/Packages/binutils-2.20.51.0.2-5.44.el6.x86_64.rpm
rpm -iUv binutils-2.20.51.0.2-5.44.el6.x86_64.rpm

4、重新安装

yum install clickhouse-server clickhouse-client clickhouse-server-common clickhouse-compressor

5、配置

[root@mcddmpdsvm ~]# vim /etc/clickhouse-server/config.xml
<path>/mnt/ssd/clickhouse/</path>
<default_database>zampdmp</default_database>

启动:

/etc/init.d/clickhouse-server start

连接:

[root@mcddmpdsvm ~]# clickhouse-client
ClickHouse client version 1.1.54236.
Connecting to localhost:9000.
Connected to ClickHouse server version 1.1.54236.

:) show databases;

SHOW DATABASES

┌─name────┐

│ system │
│ zampdmp │
└─────────┘

二、部署clickhouse on ubuntu 14.04

1、签发证书

apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv E0C56BD4

2、修改源,注意:/etc/apt/sources.list.d下新添加一个文件click.list,写入源,不要添加到/etc/apt/sources.list文件,否则update后不生效。

vim /etc/apt/sources.list.d/click.list
deb stable main

3、更新源,查看clickhouse安装包

apt-get update
apt-cache show clickhouse-server-common

Package: clickhouse-server-common

Source: clickhouse
Version: 1.1.54310
Architecture: amd64
Maintainer: Alexey Milovidov <milovidov@yandex-team.ru>
Installed-Size: 54
Depends: clickhouse-server-base (= 1.1.54310)

4、安装clickhouse

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

5、修改配置文件

vim /etc/clickhouse-server/config.xml    
/data/dmp/ipgclickhouse
mkdir -p /data/dmp/ipgclickhouse #这个是我自定的路径,因为该路径在fastdfs上chown -R clickhouse:clickhouse /data/dmp/ipgclickhouse/etc/init.d/clickhouse-server restartStart clickhouse-server service: Path to data directory in /etc/clickhouse-server/config.xml: /data/dmp/ipgclickhouseDONE
ps aux | grep clickhouse 发现没有clickhouse进程,查看日志:tail -n10 /var/log/clickhouse-server/clickhouse-server.log 
Application: Net Exception: Cannot assign requested address: [::1]:8123

不能绑定ipv6

vim /etc/clickhouse-server/config.xml    
##注释掉该行,因为我们的网卡不能监听ipv6
0.0.0.0

重新启动,ok

/etc/init.d/clickhouse-server restartps aux | grep clickhouseclickho+  39803  0.0  0.0 248756 27756 ?        Ssl  19:56   0:00 clickhouse-server --daemon --pid-file=/var/run/clickhouse-server/clickhouse-server.pid --config-file=/etc/clickhouse-server/config.xml

转载于:https://blog.51cto.com/daixuan/2044851

你可能感兴趣的文章
彻底学会使用epoll(一)——ET模式实现分析
查看>>
路由器的密码恢复
查看>>
【Android 基础】Android中全屏或者取消标题栏
查看>>
Xilinx 常用模块汇总(verilog)【03】
查看>>
脱离标准文档流(2)---定位
查看>>
IO流之字符流
查看>>
集合异常之List接口
查看>>
Softmax回归
查看>>
紫书 习题11-11 UVa 1644 (并查集)
查看>>
App工程结构搭建:几种常见Android代码架构分析
查看>>
使用openssl进行证书格式转换
查看>>
ZOJ 3777 Problem Arrangement
查看>>
虚拟机类加载机制
查看>>
Callable和Future
查看>>
installshield12如何改变默认安装目录
查看>>
少用数字来作为参数标识含义
查看>>
ScrollView中嵌套ListView
查看>>
JAVA虚拟机05--面试必问之JVM原理
查看>>
Algs4-2.3.1如何切分数组
查看>>
uva 10815 - Andy's First Dictionary(快排、字符串)
查看>>