clickhouse升级
当前版本:20.8.13
新版本:21.6.6
1.下载更新的rpm包
下载地址:
https://mirrors.tuna.tsinghua.edu.cn/clickhouse/rpm/stable/x86_64/
2.将下载的包上传到服务器的相应目录
[root@localhost ck21]# ls -1
clickhouse-client-21.6.6.51-2.noarch.rpm
clickhouse-common-static-21.6.6.51-2.x86_64.rpm
clickhouse-server-21.6.6.51-2.noarch.rpm
[root@localhost ck21]# pwd
/soft/ck21
2.停掉服务
systemctl stop clickhouse-server.service
3.进入到该目录进行安装
[root@localhost ck21]# cd /soft/ck21
[root@localhost ck21]# yum upgrade *.rpm -y
遇到如下报错误
[root@localhost clickhouse21]# yum upgrade *.rpm -y Loaded plugins: fastestmirror Examining clickhouse-client-21.6.6.51-2.noarch.rpm: clickhouse-client-21.6.6.51-2.noarch Package clickhouse-client not installed, cannot update it. Run yum install to install it instead. Examining clickhouse-common-static-21.6.6.51-2.x86_64.rpm: clickhouse-common-static-21.6.6.51-2.x86_64 Package clickhouse-common-static not installed, cannot update it. Run yum install to install it instead. Examining clickhouse-server-21.6.6.51-2.noarch.rpm: clickhouse-server-21.6.6.51-2.noarch Package clickhouse-server not installed, cannot update it. Run yum install to install it instead.
则采用如下的方式
yum -y install *.rpm
4.使用systemctl方式启动
[root@localhost ck21]# /etc/init.d/clickhouse-server start
Init script is already running
上面是原有的方式启动,需要改成如下方式启动
[root@gbase_rh7_001 log]# systemctl start clickhouse-server.service
[root@gbase_rh7_001 log]# systemctl status clickhouse-server.service
5.登录查看新版本
[root@localhost ck21]# clickhouse-client --host 192.168.56.10 --port=9000 -m
ClickHouse client version 21.6.6.51 (official build).
Connecting to 192.168.56.10:9000 as user default.
Connected to ClickHouse server version 21.6.6 revision 54448.