首页 > 其他分享 >ClickHouse 安装部署

ClickHouse 安装部署

时间:2022-09-01 14:55:42浏览次数:51  
标签:hadoop201 部署 hui server etc ClickHouse -- 安装 clickhouse

1、前置环境准备

1.1、查看是否存在旧版本ClickHouse 

[hui@hadoop201 ~]$ rpm -qa |grep clickhouse

如果存在安装数据可以卸载

yum remove -y clickhouse-common-static
yum remove -y clickhouse-server-common
rm -rf /var/lib/clickhouse
rm -rf /etc/clickhouse-*
rm -rf /var/log/clickhouse-server

注意:安装卸载使用root用户

1.2、关闭防火墙

systemctl stop firewalld
systemctl disable firewalld.service

1.3、CentOS设置打开文件数限制

查看限制

[hui@hadoop201 ~]$ ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 63372
max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) unlimited
open files                      (-n) 65536
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) 131072
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited
sudo vim  /etc/security/limits.conf文件的末尾加入以下内容
[hui@hadoop201 ~]$ sudo vim /etc/security/limits.conf
* soft nofile 65536
* hard nofile 65536
* soft nproc 131072
* hard nproc 131072
sudo vim /etc/security/limits.d/20-nproc.conf文件的末尾加入以下内容

[hui@hadoop201 ~]$ sudo vim  /etc/security/limits.d/20-nproc.conf
* soft nofile 65536
* hard nofile 65536
* soft nproc 131072
* hard nproc 131072

1.4、安装依赖

[hui@hadoop201 ~]$ sudo yum install -y libtool
[hui@hadoop201 ~]$  sudo yum install -y *unixODBC*

1.5、CentOS取消SELINUX

修改/etc/selinux/config中的SELINUX=disabled

[hui@hadoop201 ~]$ sudo vim /etc/selinux/config
SELINUX=disabled

 设置完毕 SELINUX 如果不方便重启机器可以使其临时生效;

setenforce 0

2、安装 ClickHouse

2.1、上传安装文件

[hui@hadoop201 clickhouse]$ ll
total 938164
-rw-rw-r-- 1 hui hui     78074 Jul 27  2021 clickhouse-client-21.7.3.14-2.noarch.rpm
-rw-rw-r-- 1 hui hui 174283244 Jul 27  2021 clickhouse-common-static-21.7.3.14-2.x86_64.rpm
-rw-rw-r-- 1 hui hui 786208040 Jul 27  2021 clickhouse-common-static-dbg-21.7.3.14-2.x86_64.rpm
-rw-rw-r-- 1 hui hui    101969 Jul 27  2021 clickhouse-server-21.7.3.14-2.noarch.rpm

2.2、安装 rpm 文件

[root@hadoop201 clickhouse]# rpm -ivh *.rpm 

2.3、配置

[hui@hadoop201 software]$ sudo vim /etc/clickhouse-server/config.xml 
把 <listen_host>::</listen_host> 的注释打开,这样的话才能让ClickHouse被除本机以外的服务器访问

2.4、启动

[root@hadoop201 clickhouse]# clickhouse start
 chown --recursive clickhouse '/var/run/clickhouse-server/'
Will run su -s /bin/sh 'clickhouse' -c '/usr/bin/clickhouse-server --config-file /etc/clickhouse-server/config.xml --pid-file /var/run/clickhouse-server/clickhouse-server.pid --daemon'
Waiting for server to start
Waiting for server to start
Server started

此时ClickHouse 已经启动

[root@hadoop201 clickhouse]# clickhouse status
/var/run/clickhouse-server/clickhouse-server.pid file exists and contains pid = 3154.
The process with pid = 3154 is running.

2.5、连接测试

[root@hadoop201 clickhouse]#  clickhouse-client -m
ClickHouse client version 21.7.3.14 (official build).
Connecting to localhost:9000 as user default.
Connected to ClickHouse server version 21.7.3 revision 54449.

hadoop201 :) show databases;

SHOW DATABASES

Query id: f052da3a-a091-4bf5-95cd-e6045db2f6cb

┌─name────┐
│ default │
│ system  │
└─────────┘

2 rows in set. Elapsed: 0.005 sec. 

至此,CLickHouse 安装完毕。

标签:hadoop201,部署,hui,server,etc,ClickHouse,--,安装,clickhouse
From: https://www.cnblogs.com/wdh01/p/16543030.html

相关文章

  • 安装调试MySql经常遇到的问题
    1、mysqlserver安装完毕,远程登录不上 1130错误mysql-u用户名-p密码mysql>usemysql;mysql>updateusersethost='%'whereuser='root';mysql>flushprivi......
  • Tomcat安装及环境变量配置
    Tomcat下载及安装Step①:进入Tomcat官网:WelcometoTheApacheSoftwareFoundation! 首字母T的指引下,找到Tomcat。 Download下边的版本,这里最新的是10.x版本,但是......
  • 在vm中安装centos7
    步骤:1、打开VMwareWorktation,点击“创建新的虚拟机”;2、一般选择“典型(推荐)“,之后下一步。  3、选择“稍后安装操作系统”,下一步。   4、因为要安装的是ce......
  • 在vue中进行ElementUI 组件的安装、引入 npm i element-ui -S
    在vue中进行ElementUI组件的安装、引入1.安装、引入elementUIcmd进入vue项目所在文件夹安装elementUInpmielement-ui-S在main.js中引入importElementUI......
  • Windows 系统 PostgreSQL 手工安装配置方法
    自从2020年底开始接触PostgreSQL以来就喜欢上了这个数据库,个人感觉比MySQL好用,多表联合查询性能好很多,同时也不存在SQLServer的版权授权费用问题。搭配.NET开发很......
  • liunx系统docker部署.net core3.1
    此篇文章演示基本的基于docker部署.netcore服务,liunx系统腾讯云ubuntu,.netcore版本3.1。1.安装dockeraptinstalldocker.io2.拉取.netcore依赖镜像dockerpullm......
  • linux下安装MariaDB
    MYSQL依赖包:yum-yinstalllibaio.so.1libgcc_s.so.1libstdc++.so.6yumupdatelibstdc++-4.4.7-4.el6.x86_64yum-yinstalllibncurses.so.5libtinfo.so.5......
  • 安装git
    1.1去官网下载配置环境变量Test1.3配置gitconfig1.4配置idea1.5安装插件这里我已经安装过了......
  • server2022安装宝塔后不能远程
    server2022安装宝塔后不能远程server2022安装宝塔会出现远程不了的情况,查看详细信息是Errorcode:0x3+Extendederrorcode:0x11YourRemoteDesktopServicessession......
  • ubuntu 16.04 ORB-SLAM3安装
    目录1.安装依赖库1.1安装Pangolin1.2安装Opencv1.3安装Eigen31.4其他依赖2安装ORB-SLAM31.安装依赖库1.1安装Pangolin注意:在github:https://github.co......