当前位置:网站首页>Linux system uninstall, install, upgrade, migrate clickHouse database
Linux system uninstall, install, upgrade, migrate clickHouse database
2022-08-02 09:55:00 【night rain】
1. View the clickhouse version
rpm -qa|grep clickhouse2. View clickhouse service
service clickhouse-server status3. Close the clickhouse service
sudo service clickhouse-server stop//or simply end the processps -ef|grep clickkill -9 process code4. Uninstall clickhouse
yum remove -y clickhouse-common-staticyum remove -y clickhouse-server-commonrm -rf /var/lib/clickhouserm -rf /etc/clickhouse-*rm -rf /var/log/clickhouse-server5. Install clickhouse
Download three clickHouse files
Select the same version for three files, and versions below 21 may not be supportedclickhouse window function, I chose version 21.3.4.25
//Install clickhouse components in orderrpm -ivh clickhouse-common-static-21.3.4.25-2.x86_64.rpmrpm -ivh clickhouse-server-21.3.4.25-2.noarch.rpmrpm -ivh clickhouse-client-21.3.4.25-2.noarch.rpmModify config and users configuration


Modify the configuration vim /etc/clickhouse-server/config.xml Change to the location where data is stored after this line/var/lib/clickhouse/ Modify the configuration vim /etc/clickhouse-server/users.xml database username and passworddefault default default 6. Start the clickhouse service
sudo service clickhouse-server start7. Migrate clickhouse data

First check where the clickhouse data existscat /etc/clickhouse-server/config.xmlView The path after this lineThe path defaults to /var/lib/clickhouseCompress data, metadata, store folder data (data: database name, metadata: database table sql, store: data)tar -zcvf filenametar -xvf filename.gazUnzip and overwrite the three files in the /var/lib/clickhouse path of clickhouse in the new serverstart clickhouse servicesudo service clickhouse-server startNext, let's connect and test itUninstalling, installing, upgrading, and migrating the clickHouse database have all been explained here!
If the article is wrong or in doubt, please leave a message to discuss~
边栏推荐
猜你喜欢

【SeaTunnel】从一个数据集成组件演化成企业级的服务
![[Must read] Mylander valuation analysis, electrical stimulation products for pelvic and postpartum rehabilitation](/img/25/e16bac4e789cddadffd43ed9e9df7c.jpg)
[Must read] Mylander valuation analysis, electrical stimulation products for pelvic and postpartum rehabilitation

AutoJs学习-密码生成器

Navicat连接MySQL时弹出:1045:Access denied for user ‘root’@’localhost’

牛客网项目17节生成验证码 刷新验证码一直没反应

LeetCode第三题(Longest Substring Without Repeating Characters)三部曲之一:解题思路

system_error错误处理库学习

【Redis】通用命令

要长续航还是更安全?海豹与深蓝SL03对比导购

膜拜,Alibaba分布式系统开发与核心原理解析手册
随机推荐
R语言ggpubr包的ggbarplot函数可视化分组柱状图、设置add参数为mean_se可视化不同水平均值的柱状图并为柱状图添加误差线(se标准误差)、position参数自定义分组柱状图分离
QT专题:组合会话框和文本编辑器
Tencent T8 architect, teach you to learn small and medium R&D team architecture practice PDF, senior architect shortcut
百战RHCE(第四十六战:运维工程师必会技-Ansible学习1-基础知识讲解)
从零开始入门单片机(一):必会背景知识总结
system_error错误处理库学习
李航《统计学习方法》笔记之监督学习Supervised learning
日元疲软令游戏机在日本变身“理财产品”:黄牛大赚
js防抖函数和函数节流的应用场景
QT专题:自定义部件
谈谈对Volatile的理解
带你认识40G单纤双向光模块-QSFP+ BiDi光模块
Implementation of mysql connection pool
leetcode:81. 搜索旋转排序数组 II
李航《统计学习方法》笔记之k近邻法
matlab-day02
R语言时间序列数据的平滑:使用KernSmooth包的dpill函数和locpoly函数对时间序列数据进行平滑以消除噪声
Re23:读论文 How Does NLP Benefit Legal System: A Summary of Legal Artificial Intelligence
cococreator dynamically set sprite
练习-17