通过RPM包离线安装Clickhouse 20.3(LTS版本)

ClickHouse笔记 专栏收录该内容
11 篇文章 4 订阅

1、原因

由于公司内网服务器环境是不能联网的,没法通过在线方式安装。这里记录一下通过RPM包离线安装Clickhouse 20.3(LTS版本)的过程。

2、下载RPM包

(1)官方安装文档
https://clickhouse.tech/docs/zh/getting-started/install/
(2)安装包介绍

一般安装需要如下4个软件包

  • clickhouse-common-static — ClickHouse编译的二进制文件。
  • clickhouse-server — 创建clickhouse-server软连接,并安装默认配置服务
  • clickhouse-client — 创建clickhouse-client客户端工具软连接,并安装客户端配置文件。
  • clickhouse-common-static-dbg — 带有调试信息的ClickHouse二进制文件

最小化安装

  • clickhouse-common-static
  • clickhouse-server
  • clickhouse-client

(3)下载安装包
https://repo.yandex.ru/clickhouse/rpm/stable/x86_64/
在这里插入图片描述
下载三个RPM包

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

3、安装RPM

(1)上传到服务器

[root@elastic1 app]# ll
total 135016
-rw-r--r-- 1 root    root       134254 Sep 11 13:33 clickhouse-client-20.3.9.70-2.noarch.rpm
-rw-r--r-- 1 root    root    116924361 Sep 11 13:37 clickhouse-common-static-20.3.9.70-2.x86_64.rpm
-rw-r--r-- 1 root    root       155513 Sep 11 13:33 clickhouse-server-20.3.9.70-2.noarch.rpm
drwxr-xr-x 9 root    root         4096 Jun 28  2019 nacos
-rw-rw-r-- 1 elastic elastic  21035126 Jun 28  2019 sentinel-dashboard-1.6.2.jar

(2)安装

[root@elastic1 app]# rpm -ivh clickhouse-common-static-20.3.9.70-2.x86_64.rpm 
warning: clickhouse-common-static-20.3.9.70-2.x86_64.rpm: Header V4 RSA/SHA1 Signature, key ID e0c56bd4: NOKEY
Preparing...                          ################################# [100%]
Updating / installing...
   1:clickhouse-common-static-20.3.9.7################################# [100%]
[root@elastic1 app]# rpm -ivh clickhouse-server-20.3.9.70-2.noarch.rpm 
warning: clickhouse-server-20.3.9.70-2.noarch.rpm: Header V4 RSA/SHA1 Signature, key ID e0c56bd4: NOKEY
Preparing...                          ################################# [100%]
Updating / installing...
   1:clickhouse-server-20.3.9.70-2    ################################# [100%]
Created symlink from /etc/systemd/system/multi-user.target.wants/clickhouse-server.service to /etc/systemd/system/clickhouse-server.service.
Path to data directory in /etc/clickhouse-server/config.xml: /var/lib/clickhouse/
[root@elastic1 app]# rpm -ivh clickhouse-client-20.3.9.70-2.noarch.rpm 
warning: clickhouse-client-20.3.9.70-2.noarch.rpm: Header V4 RSA/SHA1 Signature, key ID e0c56bd4: NOKEY
Preparing...                          ################################# [100%]
Updating / installing...
   1:clickhouse-client-20.3.9.70-2    ################################# [100%]

(3)启动服务

[root@elastic1 app]# systemctl start clickhouse-server.service 

(4)测试客服端

[root@elastic1 app]# clickhouse-client 
ClickHouse client version 20.3.9.70 (official build).
Connecting to localhost:9000 as user default.
Connected to ClickHouse server version 20.3.9 revision 54433.

elastic1 :) show databases;

SHOW DATABASES

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

2 rows in set. Elapsed: 0.004 sec. 

elastic1 :) exit
Bye.
[root@elastic1 app]#
  • 1
    点赞
  • 1
    评论
  • 10
    收藏
  • 一键三连
    一键三连
  • 扫一扫,分享海报

©️2021 CSDN 皮肤主题: 创作都市 设计师:CSDN官方博客 返回首页
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值