当前位置:网站首页>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 clickhouse
2. View clickhouse service
service clickhouse-server status
3. Close the clickhouse service
sudo service clickhouse-server stop//or simply end the processps -ef|grep clickkill -9 process code
4. 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-server
5. 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.rpm
Modify 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 start
7. 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 it
Uninstalling, 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~
边栏推荐
猜你喜欢
mysql连接池的实现
Nodejs3day(express简介,express创建基本Web服务器,托管静态资源,nodemon下载及出现的问题,中间件,编写GET,POST,JSONP接口)
Navicat连接MySQL时弹出:1045:Access denied for user ‘root’@’localhost’
Supervised learning of Li Hang's "Statistical Learning Methods" Notes
QT专题:事件机制event基础篇
Naive Bayesian Method of Li Hang's "Statistical Learning Methods" Notes
裁员趋势下的大厂面试:“字节跳动”
【新版干货书】深度伪造 (DeepFakes):创造,检测和影响
AutoJs学习-存款计算器
HikariCP数据库连接池,太快了!
随机推荐
RPA助你玩转抖音,开启电商运营新引擎
Mistakes in Brushing the Questions 1-Implicit Conversion and Loss of Precision
你有了解过这些架构设计,架构知识体系吗?(架构书籍推荐)
php组件漏洞
QT专题:事件机制event基础篇
cococreator dynamically set sprite
cococreator 动态设置精灵
Spend 2 hours a day to make up for Tencent T8, play 688 pages of SSM framework and Redis, and successfully land on Meituan
Pytorch's LSTM parameters explained
用了TCP协议,就一定不会丢包嘛?
HCIA静态路由综合练习
日元疲软令游戏机在日本变身“理财产品”:黄牛大赚
第十六章 协程
nacos项目搭建
【技术分享】OSPFv3基本原理
一文带你了解推荐系统常用模型及框架
node封装一个图片拼接插件
matlab-day02
leetcode 62. Unique Paths(独特的路径)
带你认识40G单纤双向光模块-QSFP+ BiDi光模块