本文共 2947 字,大约阅读时间需要 9 分钟。
一、在CentOS上部署clickhouse
1、安装源[root@mcddmpdsvm ~]# vim /etc/yum.repos.d/clickhouse-el6.repo [clickhouse]name=Yandex Clickhouse packages built by Red Softbaseurl=enabled=1gpgcheck=0metadata_expire=1m2、安装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 problemYou could try running: rpm -Va --nofiles --nodigest3、解决办法,更换binutils版本5.43->>5.44
rpm -e binutils-2.20.51.0.2-5.43.el6.x86_64wget 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.rpmrpm -iUv binutils-2.20.51.0.2-5.44.el6.x86_64.rpm4、重新安装
yum install clickhouse-server clickhouse-client clickhouse-server-common clickhouse-compressor5、配置
[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-clientClickHouse 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 E0C56BD42、修改源,注意:/etc/apt/sources.list.d下新添加一个文件click.list,写入源,不要添加到/etc/apt/sources.list文件,否则update后不生效。
vim /etc/apt/sources.list.d/click.list deb stable main3、更新源,查看clickhouse安装包
apt-get updateapt-cache show clickhouse-server-commonPackage: clickhouse-server-common
Source: clickhouseVersion: 1.1.54310Architecture: amd64Maintainer: Alexey Milovidov <milovidov@yandex-team.ru>Installed-Size: 54Depends: clickhouse-server-base (= 1.1.54310)4、安装clickhouse
apt-get install clickhouse-server-common clickhouse-client -y5、修改配置文件
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.logApplication: Net Exception: Cannot assign requested address: [::1]:8123
不能绑定ipv6
vim /etc/clickhouse-server/config.xml ##注释掉该行,因为我们的网卡不能监听ipv60.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