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

1、原因

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

2、下载RPM包

https://repo.yandex.ru/clickhouse/rpm/stable/x86_64/
通过RPM包离线安装Clickhouse 20.3(LTS版本)_第1张图片
下载三个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]#

你可能感兴趣的:(ClickHouse笔记,离线,RPM包)