ClickHouse RPM packages installation from packagecloud.io
Table of Contents
Introduction
All instructions in this manual were tested on Centos 6.9 and CentOS 7.3. In order to install ClickHouse RPM packages from packagecloud.io repository, we need to register it (repo) with our yum
, making yum
avare of additional packages installable from packagecloud.io.
In general, repositories are listed in /etc/yum.repos.d
folder, so we need to add packagecloud.io repository description in there.
This can be done either manually or via script, provided by packagecloud.io. In any case, as a result, we'll have ClickHouse packages available for installation via yum
.
Let's start with script-based installation, since this approach looks like more user-friendly.
Script-based installation
For our convenience, packagecloud.io provides nice and user-friendly way to add repos with their script. We'll need to download and run packagecloud's bash script, which will do all required steps.
Install script
Ensure curl
is installed on the system
sudo yum install -y curl
Let's download and run installation shell-script, provided by packagecloud.io
curl -s https://packagecloud.io/install/repositories/altinity/clickhouse/script.rpm.sh | sudo bash
Install packages after script
First of all, ensure we have ClickHouse packages available for installation
sudo yum list 'clickhouse*'
ClickHouse packages should be listed as available, something like this:
Available Packages
clickhouse-client.x86_64 1.1.54276-3.el7 altinity_clickhouse
clickhouse-compressor.x86_64 1.1.54276-3.el7 altinity_clickhouse
clickhouse-debuginfo.x86_64 1.1.54276-3.el7 altinity_clickhouse
clickhouse-server.x86_64 1.1.54276-3.el7 altinity_clickhouse
clickhouse-server-common.x86_64 1.1.54276-3.el7 altinity_clickhouse
Now let's install ClickHouse
sudo yum install -y 'clickhouse*'
and verify it is listed as installed
sudo yum list installed 'clickhouse*'
ClickHouse packages should be listed as installed, something like this:
Installed Packages
clickhouse-client.x86_64 1.1.54276-3.el7 @altinity_clickhouse
clickhouse-compressor.x86_64 1.1.54276-3.el7 @altinity_clickhouse
clickhouse-debuginfo.x86_64 1.1.54276-3.el7 @altinity_clickhouse
clickhouse-server.x86_64 1.1.54276-3.el7 @altinity_clickhouse
clickhouse-server-common.x86_64 1.1.54276-3.el7 @altinity_clickhouse
Ensure ClicKhouse server is running
sudo /etc/init.d/clickhouse-server restart
And connect to it with clickhouse-client
clickhouse-client
ClickHouse client version 1.1.54276.
Connecting to localhost:9000.
Connected to ClickHouse server version 1.1.54276.
:)
Well, all looks fine and ClickHouse installed from RPM packages!
We are all done!
Manual installation
Let's add packagecloud.io repo manually
Install required packages
We'll need two packages installed beforehands:
- pygpgme - helps handling gpg-signatures
- yum-utils - contains tools for handling source RPMs
sudo yum install -y pygpgme yum-utils
Create required files
Now let's create yum
's repository configuration file: /etc/yum.repos.d/altinity_clickhouse.repo
Depending on what CentOS version you are running you may need files for EL 6 or 7 version
EL6 repo file
For EL6 copy+paste into /etc/yum.repos.d/altinity_clickhouse.repo
[altinity_clickhouse]
name=altinity_clickhouse
baseurl=https://packagecloud.io/altinity/clickhouse/el/6/$basearch
repo_gpgcheck=1
gpgcheck=0
enabled=1
gpgkey=https://packagecloud.io/altinity/clickhouse/gpgkey
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
metadata_expire=300
[altinity_clickhouse-source]
name=altinity_clickhouse-source
baseurl=https://packagecloud.io/altinity/clickhouse/el/6/SRPMS
repo_gpgcheck=1
gpgcheck=0
enabled=1
gpgkey=https://packagecloud.io/altinity/clickhouse/gpgkey
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
metadata_expire=300
EL7 repo file
For EL7 copy+paste into /etc/yum.repos.d/altinity_clickhouse.repo
[altinity_clickhouse]
name=altinity_clickhouse
baseurl=https://packagecloud.io/altinity/clickhouse/el/7/$basearch
repo_gpgcheck=1
gpgcheck=0
enabled=1
gpgkey=https://packagecloud.io/altinity/clickhouse/gpgkey
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
metadata_expire=300
[altinity_clickhouse-source]
name=altinity_clickhouse-source
baseurl=https://packagecloud.io/altinity/clickhouse/el/7/SRPMS
repo_gpgcheck=1
gpgcheck=0
enabled=1
gpgkey=https://packagecloud.io/altinity/clickhouse/gpgkey
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
metadata_expire=300
Update cache
After repo files created, let's update yum
's cache with packges from newly added altinity_clickhouse
repo
sudo yum -q makecache -y --disablerepo='*' --enablerepo='altinity_clickhouse'
Install packages manually
Packages can be installed the same way as in section Install packages after script
Conclusion
Now we have ClickHouse RPM packages available for easy installation.
原文: https://github.com/Altinity/clickhouse-rpm-install
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· AI与.NET技术实操系列:基于图像分类模型对图像进行分类
· go语言实现终端里的倒计时
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 分享一个免费、快速、无限量使用的满血 DeepSeek R1 模型,支持深度思考和联网搜索!
· 25岁的心里话
· 基于 Docker 搭建 FRP 内网穿透开源项目(很简单哒)
· ollama系列01:轻松3步本地部署deepseek,普通电脑可用
· 按钮权限的设计及实现