ClickHouse安装(成功安装)

news2024/11/16 3:44:58

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-bridge
 useradd -r --shell /bin/false --home-dir /nonexistent -g clickhouse-bridge clickhouse-bridge
 chown -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 start

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

Synchronizing 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.rpm
 clickhouse-common-static-21.10.6.2-2.x86_64.rpm
 clickhouse-common-static-dbg-21.10.6.2-2.x86_64.rpm
 clickhouse-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.coloradmin.cn/o/1638121.html

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

相关文章

B站评论区自动私信关注助手

电脑协议版本&#xff0c;不支持安卓系统 支持一键采集评论区精准用户&#xff0c;可通过关键词进行筛选&#xff0c;导出数据表格 支持全自动关注私信&#xff0c;实现评论区截流曝光&#xff0c;日引500精准粉 支持一台电脑批量账号矩阵&#xff0c;定点爆破&#xff0c;全…

Mac 版 安装NVM

优质博文IT-BLOG-CN NVM&#xff08;Node Version Manager&#xff09;是一个用于管理多个Node.js版本的工具。它允许开发者在同一台机器上安装和切换不同版本的Node.js&#xff0c;以便在不同的项目中使用不同的Node.js版本。macOS用户可以使用homebrew来安装NVM。 一、安装h…

黑马 - websocket搭建在线聊天室

这里写自定义目录标题 一、消息推送常见方式二、websocket 是什么&#xff1f;三、websocket api的介绍1、客户端 &#xff08;浏览器&#xff09; 四、实现在线聊天室1、需求2、聊天室流程分析3、消息格式4、代码实现 一、消息推送常见方式 1、轮训方式 2、SSE&#xff08;…

Python | Leetcode Python题解之第63题不同路径II

题目&#xff1a; 题解&#xff1a; class Solution:def uniquePathsWithObstacles(self, obstacleGrid: List[List[int]]) -> int:row len(obstacleGrid)col len(obstacleGrid[0])dp [[0]*col for _ in range(row)]for i in range(row):for j in range(col):if not obs…

Vue 组件化开发、根组件

Vue开发的两种方式&#xff1a; 核心包传统开发模式&#xff1a;基于html/css/js文件&#xff0c;直接引入核心包&#xff0c;开发Vue工程化开发模式&#xff1a;基于构建工具的环境中开发Vue 这里选择Vue cli脚手架 进行开发&#xff0c;搜索教程自行下载。 组件化开发 一个页…

Elasticsearch:理解近似最近邻 (ANN) 算法

作者&#xff1a;来自 Elastic Elastic Platform Team 如果你是在互联网出现之前长大的&#xff0c;你会记得找到新喜好并不总是那么容易。我们是在无意中听到收音机里的新乐队时发现他们的&#xff0c;是因为忘了换频道偶然看到一个新电视节目的&#xff0c;也是几乎完全依据游…

『项目整理』易CAR通项目说明文档-我的第一款APP

『项目整理』易CAR通项目说明文档-我的第一款APP 项目介绍功能介绍技术栈介绍实现效果如何运行备注 项目介绍 易CAR通项目是我的第一个Android项目。是一款结合了AR技术的模仿懂车帝的看车软件。因为是初学&#xff0c;所示实现的效果差强人意&#xff0c;很多的功能界面只实现…

算法训练营第十三天 | LeetCode 239 滑动窗口最大值、LeetCode 347 前K个高频元素

LeetCode 239 滑动窗口最大值 本体初始思路是这样的&#xff0c;首先看下给定数组长度和维持一个滑动窗口所需要花费的时间复杂度之间的关系。初步判断是还行的&#xff0c;当然后面被样例打脸了。需要更新成优先队列的解法。原本的解法能通过37/51和46/51的测试用例。但这还不…

Dynamic-Programming

目录 前言 引入 1) Fibonacci 2) 最短路径 - Bellman-Ford 3) 不同路径-Leetcode 62 4) 0-1 背包问题 降维 5) 完全背包问题 降维 6) 零钱兑换问题-Leetcode322 降维 零钱兑换 II-Leetcode 518 7) 钢条切割问题 降维 类似题目 Leetcode-343 整数拆分 8) 最长…

如何安全的使用密码登录账号(在不知道密码的情况下)

首先&#xff0c;需要用到的这个工具&#xff1a; 度娘网盘 提取码&#xff1a;qwu2 蓝奏云 提取码&#xff1a;2r1z 1、打开工具&#xff0c;进入账号密码模块&#xff0c;如图 2、看到鼠标移动到密码那一栏有提示&#xff0c;按住Ctrl或者Alt点击或者双击就能复制内容&…

Linux(ubuntu)—— 用户管理user 用户组group

一、用户 1.1、查看所有用户 cat /etc/passwd 1.2、新增用户 useradd 命令&#xff0c;我这里用的是2.4的命令。 然后&#xff0c;需要设置密码 passwd student 只有root用户才能用passwd命令设置其他用户的密码&#xff0c;普通用户只能够设置自己的密码 二、组 2.1查看…

人工智能与地理大数据实验--出租车GPS数据—时空大数据Python处理基础(二)

环境&#xff1a;Windows 10 专业版 Python 3.9.1 Anaconda 2020&#xff08; 4.8.2&#xff09; 系列文章&#xff1a; 人工智能与地理大数据实验--出租车GPS数据—时空大数据Python处理基础&#xff08;一&#xff09; 人工智能与地理大数据实验--出租车GPS数据—时空大数据…

接收区块链的CCF会议--APSEC 2024 截止7.13 附录用率

会议名称&#xff1a;APSEC&#xff08;Asia-Pacific Software Engineering Conference&#xff09; CCF等级&#xff1a;CCF C类学术会议 类别&#xff1a;软件工程/系统软件/程序设计语言 录用率&#xff1a;2023年&#xff0c;90 submissions were recommended for accep…

【MATLAB画图】如何绘制图像坐标系

首先我们需要图像坐标轴的原点在左上角&#xff1a; set(gca,ydir,reverse,xaxislocation,top); 然后我们需要坐标轴上加上箭头 quiver(0, 0, 0, 520); % 在(x1, y1)处绘制一个箭头&#xff0c;其方向和长度由(dx, dy)确定 quiver(0, 0, 700, 0); % 在(x1, y1)处绘制一个箭头…

缓存分享(1)——Guava Cache原理及最佳实践

Guava Cache原理及最佳实践 1. Guava Cache是什么1.1 简介1.2 核心功能1.3 适用场景 2. Guava Cache的使用2.1 创建LoadingCache缓存2.2 创建CallableCache缓存 缓存的种类有很多&#xff0c;需要根据不同的应用场景来选择不同的cache&#xff0c;比如分布式缓存如redis、memca…

帕金森患者应该怎么注意生活方式?

在面对帕金森病的挑战时&#xff0c;科学合理地改善日常生活方式&#xff0c;不仅能帮助患者更好地管理病情&#xff0c;还能提升生活质量。今天&#xff0c;让我们一起探索如何通过简单的日常调整&#xff0c;为患有帕金森病的朋友们带来积极的变化。 饮食调整&#xff1a;营养…

MATLAB 函数

MATLAB 函数 函数是一起执行任务的一组语句。在MATLAB中&#xff0c;函数是在单独的文件中定义的。文件名和函数名应该相同。 函数在其自己的工作空间&#xff08;也称为本地工作空间&#xff09;中对变量进行操作&#xff0c;与在MATLAB命令提示符下访问的工作空间&#xff0…

优化|贝叶斯优化系列(一):基础算法原理

贝叶斯优化是一种处理黑盒函数优化问题的重要方法。它通过构建一个目标函数的代理模型&#xff0c;并且利用贝叶斯机器学习方法如高斯过程回归来评估代理模型的不确定性。基于代理模型&#xff0c;通过一个采样函数来决定在哪里进行采样。本推文简单描述了贝叶斯优化方法的框架…

【1小时掌握速通深度学习面试1】卷积神经网络-上

目录 1.简述卷积的基本操作&#xff0c;并分析其与全连接层的区别 2.在卷积神经网络中&#xff0c;如何计算各层的感受野大小?卷积层的输出尺寸、参数量和计算量。 3.简述分组卷积及其应用场景 4.简述空洞卷积的设计思路 5.简述转置卷积的主要思想以及应用场景 1.简述卷积…

8. Django 表单与模型

8. 表单与模型 表单是搜集用户数据信息的各种表单元素的集合, 其作用是实现网页上的数据交互, 比如用户在网站输入数据信息, 然后提交到网站服务器端进行处理(如数据录入和用户登录注册等).网页表单是Web开发的一项基本功能, Django的表单功能由Form类实现, 主要分为两种: dj…