1、在CentOS上部署clickhouse
一、安裝源
[root@mcddmpdsvm ~]# vim /etc/yum.repos.d/clickhouse-el6.repo
[clickhouse]
name=Yandex Clickhouse packages built by Red Soft
baseurl=http://repo.red-soft.biz/repos/clickhouse/stable/el6/
enabled=1
gpgcheck=0
metadata_expire=1mlinux
二、安裝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 --nodigestubuntu
三、解決辦法,更換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.rpmvim
四、從新安裝
yum install clickhouse-server clickhouse-client clickhouse-server-common clickhouse-compressoride
五、配置
[root@mcddmpdsvm ~]# vim /etc/clickhouse-server/config.xml
<path>/mnt/ssd/clickhouse/</path>
<default_database>zampdmp</default_database>ui
啓動:
/etc/init.d/clickhouse-server starturl
鏈接:
[root@mcddmpdsvm ~]# clickhouse-client
ClickHouse client version 1.1.54236.
Connecting to localhost:9000.
Connected to ClickHouse server version 1.1.54236..net
:) show databases;rest
SHOW DATABASES日誌
┌─name────┐
│ system │
│ zampdmp │
└─────────┘code
2、部署clickhouse on ubuntu 14.04
一、簽發證書
apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv E0C56BD4
二、修改源,注意:/etc/apt/sources.list.d下新添加一個文件click.list,寫入源,不要添加到/etc/apt/sources.list文件,不然update後不生效。
vim /etc/apt/sources.list.d/click.list
deb http://repo.yandex.ru/clickhouse/trusty stable main
三、更新源,查看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)
四、安裝clickhouse
apt-get install clickhouse-server-common clickhouse-client -y
五、修改配置文件
vim /etc/clickhouse-server/config.xml <!-- Path to data directory, with trailing slash. --> <path>/data/dmp/ipgclickhouse</path>
mkdir -p /data/dmp/ipgclickhouse #這個是我自定的路徑,由於該路徑在fastdfs上 chown -R clickhouse:clickhouse /data/dmp/ipgclickhouse /etc/init.d/clickhouse-server restart Start clickhouse-server service: Path to data directory in /etc/clickhouse-server/config.xml: /data/dmp/ipgclickhouse DONE
ps aux | grep clickhouse 發現沒有clickhouse進程,查看日誌: tail -n10 /var/log/clickhouse-server/clickhouse-server.log <Error> Application: Net Exception: Cannot assign requested address: [::1]:8123
不能綁定ipv6
vim /etc/clickhouse-server/config.xml <!--<listen_host>::1</listen_host> --> ##註釋掉該行,由於咱們的網卡不能監聽ipv6 <listen_host>0.0.0.0</listen_host>
從新啓動,ok
/etc/init.d/clickhouse-server restart ps aux | grep clickhouse clickho+ 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