ClickHouse-安装篇

操作系统:Centos-7.7
ClickHouse: YUM 在线安装,20.x

官网:https://clickhouse.yandex/ 具体安装细节看:https://clickhouse.tech/#quick-start

安装前准备

CentOS7 打开文件数限制:
在 /etc/security/limits.conf 这个文件的末尾加入一下内容:
sudo vim /etc/security/limits.conf

* soft nofile 65536
* hard nofile 65536
* soft nproc 131072
* hard nproc 131072

在 /etc/security/limits.d/90-nproc.conf 这个文件的末尾加入一下内容:

* soft nofile 65536
* hard nofile 65536
* soft nproc 131072
* hard nproc 131072

重启服务器之后生效,用 ulimit -n 或者 ulimit -a 查看设置结果

ulimit -n 
ulimit -a

CentOS7 取消 SELINUX
修改 /etc/selinux/config 中的 SELINUX=disabled 后重启
vim /etc/selinux/config

SELINUX=disabled

关闭防火墙
centos6:

service iptables stop
service ip6tables stop

centos7:

systemctl status firewalld.service 
systemctl stop firewalld.service 
systemctl start firewalld.service

安装依赖

yum install -y libtool 
yum install -y *unixODBC*

单机模式安装

ClickHouse的安装可以使用 yum在线安装,也可以使用 rpm 离线安装的方式! 具体信息见官网文档:https://clickhouse.tech/#quick-start

准备操作
需要验证当前服务器的 CPU 是否支持 SSE 4.2 指令集,因为向量化执行需要用到这项特性:

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

安装
依次执行如下命令:

yum install yum-utils -y
rpm --import https://repo.clickhouse.tech/CLICKHOUSE-KEY.GPG 
yum-config-manager --add-repo https://repo.clickhouse.tech/rpm/clickhouse.repo yum install clickhouse-server clickhouse-client -y

如果您没法链接互联网,则也可以使用 rpm 的方式来进行离线安装:需要下载的安装包有:

clickhouse-server-20.5.4.40-2.noarch.rpm 
clickhouse-common-static-20.5.4.40-2.x86_64.rpm 
clickhouse-client-20.5.4.40-2.noarch.rpm

下载地址在:
https://repo.yandex.ru/clickhouse/rpm/stable/x86_64/ https://packagecloud.io/Altinity/clickhouse

启动服务端
前台启动:

clickhouse-server --config-file=/etc/clickhouse-server/config.xml
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值