1 准备工作
1.1 CentOS取消打开文件数限制
在/etc/security/limits.conf 这个文件的末尾加入一下内容:
[root@hadoop102 ~]$ vim /etc/security/limits.conf
在文件末尾添加:
* soft nofile 65536
* hard nofile 65536
* soft nproc 131072
* hard nproc 131072
1.2 CentOS取消SELINUX
修改/etc/selinux/config中的SELINUX=disabled后重启
[root@hadoop102 ~]# vim /etc/selinux/config
SELINUX=disabled
3.1.3 关闭防火墙
3.1.4 安装依赖
[root@hadoop102 ~]# yum install -y libtool
[root@hadoop102 ~]# yum install -y *unixODBC*
2 单机安装
官网:https://clickhouse.yandex/
下载地址:http://repo.red-soft.biz/repos/clickhouse/stable/el6/
2.1 上传4个文件
[root@hadoop102 software]# ls
clickhouse/clickhouse-client-21.4.6.55-2.noarch.rpm
clickhouse/clickhouse-common-static-21.4.6.55-2.x86_64.rpm
clickhouse/clickhouse-common-static-dbg-21.4.6.55-2.x86_64.rpm
clickhouse/clickhouse-server-21.4.6.55-2.noarch.rpm
2.2分别在三台机子上安装这4个rpm文件
[root@hadoop102 software]# rpm -ivh *.rpm
2.3 修改配置文件:
[bigdata@hdp1 soft]#sudo chmod 751 /etc/clickhouse-server/config.xml
[bigdata@hdp1 soft]# sudo vim /etc/clickhouse-server/config.xml
把
2.4 启动ClickHouse-Server
[bigdata@hdp1 soft]#sudo systemctl start clickhouse-server
2.5 使用client连接server
[bigdata@hdp1 soft]# clickhouse-client -m
如果出现错误可以参考如下:
https://blog.csdn.net/u011652364/article/details/114268454
2.6关闭开机自启
sudo systemctl disable clickhouse-server