Clickhouse安装-单节点安装

Clickhouse安装–单节点安装

官网地址:https://clickhouse.com/docs/en/install
安装包:https://packages.clickhouse.com/rpm/stable/
安装版本为:21.7.3.14-2
所需安装包:

clickhouse-client-21.7.3.14-2.noarch.rpm
clickhouse-common-static-21.7.3.14-2.x86_64.rpm
clickhouse-common-static-dbg-21.7.3.14-2.x86_64.rpm
clickhouse-server-21.7.3.14-2.noarch.rpm

一、准备工作

1、确定防火墙处于关闭状态

systemctl stop firewalld
注意:开机自启也要关闭

查看是否开机自启
systemctl is-enabled firewalld

关闭开机自启
systemctl disable firewalld

2、CentOS取消打开文件数限制

(1)在hadoop102的/etc/security/limits.conf文件的末尾加入以下内容

vim /etc/security/limits.conf
* soft nofile 65536
* hard nofile 65536
* soft nproc 131072
* hard nproc 131072

(2)在 hadoop102 的/etc/security/limits.d/20-nproc.conf 文件的末尾加入以下内容

vim /etc/security/limits.d/20-nproc.conf
* soft nofile 65536
* hard nofile 65536
* soft nproc 131072
* hard nproc 131072

3、安装依赖

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

4、CentOS 取消 SELINUX

(1)修改/etc/selinux/config 中的 SELINUX=disabled

sudo vim /etc/selinux/config
SELINUX=disabled
注意:别改错了

二、单机安装

1、在 hadoop102 的/opt/software 下创建 clickhouse 目录

mkdir clickhouse

2、上传4个文件到 hadoop102 的software/clickhouse 目录下

在这里插入图片描述

3、安装这 4 个 rpm 文件

 rpm -ivh *.rpm

4、修改配置文件

 vim /etc/clickhouse-server/config.xml
 (1)把 <listen_host>::</listen_host> 的注释打开,这样的话才能让 ClickHouse 被除本
机以外的服务器访问

5、启动 Server

systemctl start clickhouse-server
 
推荐使用:
clickhouse status
clickhouse start
clickhouse restart
clickhouse stop

6、设置开机自启

systemctl enable clickhouse-server

7、使用 client 连接 server

 clickhouse-client -m
 -m :可以在命令窗口输入多行命令
  • 6
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值