ClickHouse安装(成功安装)

1.下载安装包

下面通过阿里镜像(https://mirrors.aliyun.com/clickhouse/rpm/lts/)进行下载,下载哪里,自行指定。

# deb包下载使用如下4行
wget https://mirrors.aliyun.com/clickhouse/deb/pool/stable/clickhouse-client_22.8.5.29_amd64.deb \
wget https://mirrors.aliyun.com/clickhouse/deb/pool/stable/clickhouse-common-static-dbg_22.8.5.29_amd64.deb \
wget https://mirrors.aliyun.com/clickhouse/deb/pool/stable/clickhouse-common-static_22.8.5.29_amd64.deb \
wget https://mirrors.aliyun.com/clickhouse/deb/pool/stable/clickhouse-server_22.8.5.29_amd64.deb

2.安装包说明

  • clickhouse-common-static — ClickHouse编译的二进制文件。

  • clickhouse-server — 创建clickhouse-server软连接,并安装默认配置服务

  • clickhouse-client — 创建clickhouse-client客户端工具软连接,并安装客户端配置文件。

  • clickhouse-common-static-dbg — 带有调试信息的ClickHouse二进制文件。

3.安装

以下安装均使用rpm包进行。

切换到安装包所在目录,执行如下命令。

# deb包
sudo dpkg -i clickhouse*

安装过程打印如下:

dpkg-deb: error: 'clickhouse-client-21.10.6.2-2.noarch.rpm' is not a Debian format archive
dpkg: error processing archive clickhouse-client-21.10.6.2-2.noarch.rpm (--install):dpkg-deb --control subprocess returned error exit status 2
Selecting previously unselected package clickhouse-client.
(Reading database ... 88991 files and directories currently installed.)
Preparing to unpack clickhouse-client_22.8.5.29_amd64.deb ...
Unpacking clickhouse-client (22.8.5.29) ...
dpkg-deb: error: 'clickhouse-common-static-21.10.6.2-2.x86_64.rpm' is not a Debian format archive
dpkg: error processing archive clickhouse-common-static-21.10.6.2-2.x86_64.rpm (--install):dpkg-deb --control subprocess returned error exit status 2
Selecting previously unselected package clickhouse-common-static.
Preparing to unpack clickhouse-common-static_22.8.5.29_amd64.deb ...
Unpacking clickhouse-common-static (22.8.5.29) ...
dpkg-deb: error: 'clickhouse-common-static-dbg-21.10.6.2-2.x86_64.rpm' is not a Debian format archive
dpkg: error processing archive clickhouse-common-static-dbg-21.10.6.2-2.x86_64.rpm (--install):dpkg-deb --control subprocess returned error exit status 2
Selecting previously unselected package clickhouse-common-static-dbg.
Preparing to unpack clickhouse-common-static-dbg_22.8.5.29_amd64.deb ...
Unpacking clickhouse-common-static-dbg (22.8.5.29) ...
dpkg-deb: error: 'clickhouse-server-21.10.6.2-2.noarch.rpm' is not a Debian format archive
dpkg: error processing archive clickhouse-server-21.10.6.2-2.noarch.rpm (--install):dpkg-deb --control subprocess returned error exit status 2
Selecting previously unselected package clickhouse-server.
Preparing to unpack clickhouse-server_22.8.5.29_amd64.deb ...
Unpacking clickhouse-server (22.8.5.29) ...
Setting up clickhouse-common-static (22.8.5.29) ...
Setting up clickhouse-common-static-dbg (22.8.5.29) ...
Setting up clickhouse-server (22.8.5.29) ...
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.
Symlink /usr/bin/clickhouse-keeper already exists but it points to /clickhouse. Will replace the old symlink to /usr/bin/clickhouse.
Creating symlink /usr/bin/clickhouse-keeper to /usr/bin/clickhouse.
Creating symlink /usr/bin/clickhouse-keeper-converter to /usr/bin/clickhouse.
Creating symlink /usr/bin/clickhouse-disks to /usr/bin/clickhouse.
Creating clickhouse group if it does not exist.groupadd -r clickhouse
Creating clickhouse user if it does not exist.useradd -r --shell /bin/false --home-dir /nonexistent -g clickhouse clickhouse
Will set ulimits for clickhouse user in /etc/security/limits.d/clickhouse.conf.
Creating config directory /etc/clickhouse-server/config.d that is used for tweaks of main server configuration.
Creating config directory /etc/clickhouse-server/users.d that is used for tweaks of users configuration.
Config file /etc/clickhouse-server/config.xml already exists, will keep it and extract path info from it.
/etc/clickhouse-server/config.xml has /var/lib/clickhouse/ as data path.
/etc/clickhouse-server/config.xml has /var/log/clickhouse-server/ as log path.
Users config file /etc/clickhouse-server/users.xml already exists, will keep it and extract users info from it.
Creating log directory /var/log/clickhouse-server/.
Creating data directory /var/lib/clickhouse/.
Creating pid directory /var/run/clickhouse-server.chown -R clickhouse:clickhouse '/var/log/clickhouse-server/'chown -R clickhouse:clickhouse '/var/run/clickhouse-server'chown  clickhouse:clickhouse '/var/lib/clickhouse/'groupadd -r clickhouse-bridgeuseradd -r --shell /bin/false --home-dir /nonexistent -g clickhouse-bridge clickhouse-bridgechown -R clickhouse-bridge:clickhouse-bridge '/usr/bin/clickhouse-odbc-bridge'chown -R clickhouse-bridge:clickhouse-bridge '/usr/bin/clickhouse-library-bridge'
Enter password for default user: 
Password for default user is saved in file /etc/clickhouse-server/users.d/default-password.xml.
Setting capabilities for clickhouse binary. This is optional.chown -R clickhouse:clickhouse '/etc/clickhouse-server'ClickHouse has been successfully installed.Start clickhouse-server with:sudo clickhouse startStart clickhouse-client with:clickhouse-client --passwordSynchronizing state of clickhouse-server.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable clickhouse-server
Created symlink /etc/systemd/system/multi-user.target.wants/clickhouse-server.service → /lib/systemd/system/clickhouse-server.service.
Setting up clickhouse-client (22.8.5.29) ...
Errors were encountered while processing:clickhouse-client-21.10.6.2-2.noarch.rpmclickhouse-common-static-21.10.6.2-2.x86_64.rpmclickhouse-common-static-dbg-21.10.6.2-2.x86_64.rpmclickhouse-server-21.10.6.2-2.noarch.rpm

安装完成,并没有自动启动,要启动

sudo clickhouse start

然后查看状态和进程pid

sudo clickhouse status

有个进程是看门狗的。有个进程是clickhouse-server的

然后,使用clickhouse-client访问,命令如下:

clickhouse-client --password

4.连接,使用客户端连接

要想远程,<listen_host>::</listen_host>这个配置要取消注释。然后重启。就可以在我本地连接我的腾讯云主机上的clickhouse了。

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/diannao/5733.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

【DIY小记】用爬虫+clean-mark+zhihu-on-vscode搬运技术博客到知乎

今天灵光一闪&#xff0c;决定调研一下自己的技术博客&#xff0c;可以怎样方便迁移到其它社媒平台。想要达到的效果是&#xff0c;把自己在掘金的专栏&#xff1a;从1到∞精通Python&#xff0c;迁移到知乎上面去。 简单花了两三小时时间&#xff0c;找到一个比较快捷的方法&…

【ARMv8/v9 常见汇编指令学习 6.1 - armv8 右移指令 LSR 详细介绍】

请阅读【嵌入式开发学习必备专栏 】 文章目录 armv8 右移指令 LSR语法示例注意事项 armv8 右移指令 LSR 在ARMv8架构中&#xff0c;lsr&#xff08;Logical Shift Right&#xff09;指令是一种逻辑右移指令&#xff0c;用于将一个寄存器中的数值向右移动指定的位数。逻辑右移操…

git 的迁移

现象是gitlab经常会挂掉&#xff0c;linux会显示磁盘空间不足&#xff0c;实际上&#xff0c;我们linux某个目录的空间是4T。这个空间应该是足够的。猜测是gitlab的安装目录不对导致的空间不足。 1、查找原因 用rpm 安装gitlab会有自己的目录&#xff0c;很多安装文件会在opt…

MySql 导出导入(备份还原)

1&#xff0c;导出备份 要导出MySQL数据库中的数据&#xff0c;使用mysqldump命令。假设要导出名为mydatabase的数据库到名为backup.sql的文件中&#xff1a; mysqldump -u 用户名 -p 数据库名 > backup.sql 参数说明&#xff1a; -u mysql用户名称 -p 执行后会要求输入…

利用Python实现Smithwaterman算法

def smith_waterman(seq1, seq2, match_score3, mismatch_penalty-1, gap_penalty-2): # 初始化矩阵 matrix [[0] * (len(seq2) 1) for _ in range(len(seq1) 1)] max_score 0 max_i, max_j 0, 0 # 填充矩阵 for i in range(1, len(seq1) 1):for j in range(1, len(seq2…

【C++】学习笔记——string_4

文章目录 六、string类7. string类的模拟实现 未完待续 六、string类 7. string类的模拟实现 我们在上文简单实现了string类的构造函数。不知道大家有没有发现一个问题&#xff0c;我们在进行实现无参的构造函数时&#xff0c;初始化列表将 _str 初始化为 nullptr 了&#xf…

CRI-O的原理及应用详解(四)

本系列文章简介&#xff1a; 随着云计算和容器技术的迅猛发展&#xff0c;容器化应用已经成为现代软件开发和部署的重要趋势。在这一领域中&#xff0c;Kubernetes作为容器编排的领军者&#xff0c;为开发者提供了强大的容器管理和调度能力。然而&#xff0c;Kubernetes本身并不…

Unity LensFlare 入门

概述 在项目的制作过程中&#xff0c;太阳光的使用一定是不可缺少的部分&#xff0c;但是如果想实现真实太阳光眼睛看到的镜头炫光效果&#xff0c;那这部分的内容一定不要错过喔&#xff0c;接下来让我们来学习这部分的内容吧&#xff01; Hale(光环效果) Color&#xff1a;…

TiDB中的PD--元数据管理和调度中心

目录 PD 架构etcd 的使用TiDB 的 PD(Placement Driver)组件是整个分布式数据库系统的关键部分, 是整个集群的元数据管理和调度中心,负责存储集群的元数据和进行 Region 调度。 主要包括: 元数据存储:PD 存储了整个 TiDB 集群的元数据,包括 TiKV 集群的拓扑结构、Namespa…

Vue在/public目录下访问process.env.NODE_ENV(其它通用)

总所周知,/public目录下的js文件是不会经过webpack处理的. 所以process.env.NODE_ENV 也无效.无法判断,当要根据这个去判断的时候就麻烦了. 但有个办法可以解决这个问题. 先安装 npm install --save-dev cross-env 就是在index.html里面去赋值到window变量中,如下 在 /pu…

操作系统:线程

目录 前言&#xff1a; 1.线程 1.1.初识线程 1.2.“轻量化”进程 1.3.线程与进程 2.线程控制 2.1.pthread原生线程库 2.2.线程控制的接口 2.2.1.线程创建 2.2.线程退出|线程等待|线程分离|线程取消 2.3.pthread库的原理 2.4.语言和pthread库的关系 2.5.线程局部…

数据可视化宝典:Matplotlib图形实战

在数据分析领域&#xff0c;图形化展示数据是非常重要的环节。Python中的matplotlib库是绘制各类图形的强大工具。本文将介绍如何使用matplotlib绘制折线图、直方图、饼图、散点图和柱状图等数据分析中常见的图形&#xff0c;并附上相应的代码示例&#xff0c;可以当初matplotl…

Linux之sed命令(包含MacOS使用方法)

Linux之sed命令 一、概述二、用法1、文件末尾追加一行2、指定行后新增一行3、指定行前新增一行4、修改指定行5、删除指定行 一、概述 Linux下的sed命令是一种流编辑器&#xff0c;用于在命令行中对文本进行处理&#xff0c;常见的操作如&#xff1a;添加、修改、删除、追加等。…

模型智能体开发之metagpt-单智能体实践

需求分析 根据诉求完成函数代码的编写&#xff0c;并实现测试case&#xff0c;输出代码 代码实现 定义写代码的action action是动作的逻辑抽象&#xff0c;通过将预设的prompt传入llm&#xff0c;来获取输出&#xff0c;并对输出进行格式化 具体的实现如下 定义prompt模版 …

前端开发中可能出现内存泄漏的情况总结

前端开发中可能出现内存泄漏的情况主要包括以下几种&#xff1a; 1. 闭包引起的循环引用 当一个函数内部引用了外部作用域的变量&#xff0c;并且该函数的作用域链没有被适时断开&#xff0c;就可能形成循环引用。特别是当DOM元素的事件处理函数使用闭包访问外部变量时&#…

Oracle故障处理:正在使用的索引失效了

项目场景 昨日&#xff0c;五一放假前一天&#xff0c;项目现场有同事反应业务系统出了问题&#xff1a; 在数据库中用测试数据发现insert、update 等操作不可用。 在应用系统的输出日志中发现数据库抛出了如下异常&#xff1a; ORA-01502:索引 ‘XX.PK_IXXX’ 或这类索引的…

神经网络与深度学习--网络优化与正则化

文章目录 前言一、网络优化1.1网络结构多样性1.2高维变量的非凸优化1.鞍点2.平坦最小值3.局部最小解的等价性 1.3.改善方法 二、优化算法2.1小批量梯度下降法&#xff08;Min-Batch&#xff09;2.2批量大小选择2.3学习率调整1.学习率衰减&#xff08;学习率退火&#xff09;分段…

Android数据恢复软件快速比较:Android数据恢复的7最佳工具

您在 Android 设备上保留哪些类型的数据&#xff1f;如果您和大多数人一样&#xff0c;那么您可能已经列出了文档、照片、视频和音频文件。如果您使用智能手机或平板电脑的时间足够长&#xff0c;我们愿意打赌您拥有Android数据丢失的第一手经验。 幸运的是&#xff0c;我们也…

打破失联困境:门店如何利用AI智能名片B2B2C商城小程序重构与消费者的紧密连接?

在如今这个消费者行为日益碎片化的时代&#xff0c;门店经营者们时常感叹&#xff1a;消费者进店如同一场不期而遇的缘分&#xff0c;然而一旦离开门店&#xff0c;就仿佛消失在茫茫人海中&#xff0c;难以再觅其踪迹。这种“进店靠缘分&#xff0c;离店就失联”的困境&#xf…

Cisco IOS XE Web UI 权限提升漏洞复现(CVE-2023-20198)

0x01 产品简介 Web UI 是一种基于GUI的嵌入式系统管理工具,能够提供系统配置、简化系统部署和可管理性以及增强用户体验。它带有默认映像,因此无需在系统上启用任何内容或安装任何许可证。Web UI 可用于构建配置以及监控系统和排除系统故障,而无需CLI专业知识。 0x02 漏洞…