admin管理员组

文章数量:1550655

1,查看老版本 20.5.4

ClickHouse client version 21.2.3.15 (official build).

Connected to ClickHouse server version 20.5.4 revision 54435.

ClickHouse server version is older than ClickHouse client. It may indicate that the server is out of date and can be upgraded.


A01-R04:) select version();

SELECT version()

Query id: cad71e46-d2cb-415f-b30a-23a2557801e8

┌─version()─┐
│ 20.5.4.40 │
└───────────┘

2, 下载新版本,执行升级命令: rpm -Uvh *.rpm

下载地址:Index of rpm/stable

warning: clickhouse-client-21.2.3.15-2.noarch.rpm: Header V4 RSA/SHA1 Signature, key ID e0c56bd4: NOKEY
warning: package clickhouse-server-21.2.3.15-2.noarch was already added, skipping clickhouse-server-common-19.4.0-2.noarch
Preparing...                          ################################# [100%]
Updating / installing...
   1:clickhouse-common-static-21.2.3.1################################# [ 17%]
   2:clickhouse-client-21.2.3.15-2    ################################# [ 33%]
   3:clickhouse-server-21.2.3.15-2    warning: /etc/clickhouse-server/config.xml created as /etc/clickhouse-server/config.xml.rpmnew
warning: /etc/clickhouse-server/users.xml created as /etc/clickhouse-server/users.xml.rpmnew
warning: /etc/init.d/clickhouse-server created as /etc/init.d/clickhouse-server.rpmnew
################################# [ 50%]

ClickHouse binary is already located at /usr/bin/clickhouse
Symlink /usr/bin/clickhouse-server already exists but it points to /clickhouse. Will replace the old symlink to /usr/bin/clickhouse.
Creating symlink /usr/bin/clickhouse-server to /usr/bin/clickhouse.
Symlink /usr/bin/clickhouse-client already exists but it points to /clickhouse. Will replace the old symlink to /usr/bin/clickhouse.
Creating symlink /usr/bin/clickhouse-client to /usr/bin/clickhouse.
Symlink /usr/bin/clickhouse-local already exists but it points to /clickhouse. Will replace the old symlink to /usr/bin/clickhouse.
Creating symlink /usr/bin/clickhouse-local to /usr/bin/clickhouse.
Symlink /usr/bin/clickhouse-benchmark already exists but it points to /clickhouse. Will replace the old symlink to /usr/bin/clickhouse.
Creating symlink /usr/bin/clickhouse-benchmark to /usr/bin/clickhouse.
Symlink /usr/bin/clickhouse-copier already exists but it points to /clickhouse. Will replace the old symlink to /usr/bin/clickhouse.
Creating symlink /usr/bin/clickhouse-copier to /usr/bin/clickhouse.
Symlink /usr/bin/clickhouse-obfuscator already exists but it points to /clickhouse. Will replace the old symlink to /usr/bin/clickhouse.
Creating symlink /usr/bin/clickhouse-obfuscator to /usr/bin/clickhouse.
Creating symlink /usr/bin/clickhouse-git-import to /usr/bin/clickhouse.
Symlink /usr/bin/clickhouse-compressor already exists but it points to /clickhouse. Will replace the old symlink to /usr/bin/clickhouse.
Creating symlink /usr/bin/clickhouse-compressor to /usr/bin/clickhouse.
Symlink /usr/bin/clickhouse-format already exists but it points to /clickhouse. Will replace the old symlink to /usr/bin/clickhouse.
Creating symlink /usr/bin/clickhouse-format to /usr/bin/clickhouse.
Symlink /usr/bin/clickhouse-extract-from-config already exists but it points to /clickhouse. Will replace the old symlink to /usr/bin/clickhouse.
Creating symlink /usr/bin/clickhouse-extract-from-config to /usr/bin/clickhouse.
Creating clickhouse group if it does not exist.
 groupadd -r clickhouse
groupadd: group 'clickhouse' already exists
Creating clickhouse user if it does not exist.
 useradd -r --shell /bin/false --home-dir /nonexistent -g clickhouse clickhouse
useradd: user 'clickhouse' already exists
Will set ulimits for clickhouse user in /etc/security/limits.d/clickhouse.conf.
Config file /etc/clickhouse-server/config.xml already exists, will keep it and extract path info from it.
/etc/clickhouse-server/config.xml has /data/clickhouse as data path.
/etc/clickhouse-server/config.xml has /data/clickhouse/logs/ as log path.
Users config file /etc/clickhouse-server/users.xml already exists, will keep it and extract users info from it.
 chown --recursive clickhouse:clickhouse '/etc/clickhouse-server'
Log directory /data/clickhouse/logs/ already exists.
Data directory /data/clickhouse already exists.
Pid directory /var/run/clickhouse-server already exists.
 chown --recursive clickhouse:clickhouse '/data/clickhouse/logs/'
 chown --recursive clickhouse:clickhouse '/var/run/clickhouse-server'
 chown clickhouse:clickhouse '/data/clickhouse'
Password for default user is already specified. To remind or reset, see /etc/clickhouse-server/users.xml and /etc/clickhouse-server/users.d.
Setting capabilities for clickhouse binary. This is optional.
 command -v setcap >/dev/null && echo > /tmp/test_setcap.sh && chmod a+x /tmp/test_setcap.sh && /tmp/test_setcap.sh && setcap 'cap_net_admin,cap_ipc_lock,cap_sys_nice+ep' /tmp/test_setcap.sh && /tmp/test_setcap.sh && rm /tmp/test_setcap.sh && setcap 'cap_net_admin,cap_ipc_lock,cap_sys_nice+ep' /usr/bin/clickhouse || echo "Cannot set 'net_admin' or 'ipc_lock' or 'sys_nice' capability for clickhouse binary. This is optional. Taskstats accounting will be disabled. To enable taskstats accounting you may add the required capability later manually."

ClickHouse has been successfully installed.

Start clickhouse-server with:
 sudo clickhouse start

Start clickhouse-client with:
 clickhouse-client --password

Cleaning up / removing...
   4:clickhouse-server-20.10.1.4635-2 ################################# [ 67%]
   5:clickhouse-client-20.10.1.4635-2 ################################# [ 83%]
   6:clickhouse-common-static-20.10.1.################################# [100%]

3, 更新users.xml配置;   21.2.3中取消了allow_experimental_data_skipping_indices

3, 重启服务并查看版本;21.2.3


ClickHouse client version 21.2.3.15 (official build).
Connected to ClickHouse server version 21.2.3 revision 54447.


default@127.0.0.1:x[wang] :) 
default@127.0.0.1:x[wang] :) select version();

SELECT version()

Query id: 24952d3f-91f1-4e01-a313-5af72621120a

┌─version()─┐
│ 21.2.3.15 │
└───────────┘

1 rows in set. Elapsed: 0.002 sec. 

default@127.0.0.1:x[wang] :) 

本文标签: 版本clickhouse