All Projects → Altinity → Clickhouse Rpm Install

Altinity / Clickhouse Rpm Install

Licence: mit
How to install clickhouse RPM packages

Projects that are alternatives of or similar to Clickhouse Rpm Install

Flink Learning
flink learning blog. http://www.54tianzhisheng.cn/ 含 Flink 入门、概念、原理、实战、性能调优、源码解析等内容。涉及 Flink Connector、Metrics、Library、DataStream API、Table API & SQL 等内容的学习案例,还有 Flink 落地应用的大型项目案例(PVUV、日志存储、百亿数据实时去重、监控告警)分享。欢迎大家支持我的专栏《大数据实时计算引擎 Flink 实战与性能优化》
Stars: ✭ 11,378 (+8266.18%)
Mutual labels:  clickhouse
Datax
DataX is an open source universal ETL tool that support Cassandra, ClickHouse, DBF, Hive, InfluxDB, Kudu, MySQL, Oracle, Presto(Trino), PostgreSQL, SQL Server
Stars: ✭ 116 (-14.71%)
Mutual labels:  clickhouse
Pnpm
Fast, disk space efficient package manager -- 快速的,节省磁盘空间的包管理工具
Stars: ✭ 14,219 (+10355.15%)
Mutual labels:  install
Robotics setup
Setup Ubuntu 18.04, 16.04 and 14.04 with machine learning and robotics software plus user configuration. Includes ceres tensorflow ros caffe vrep eigen cudnn and cuda plus many more.
Stars: ✭ 110 (-19.12%)
Mutual labels:  install
Bodhi
Bodhi is a web-system that facilitates the process of publishing updates for a Fedora-based software distribution.
Stars: ✭ 114 (-16.18%)
Mutual labels:  rpm
Npackd
Package manager for Microsoft Windows: Wiki, bug tracker, mirror of the default repositories
Stars: ✭ 118 (-13.24%)
Mutual labels:  install
Rpm Haproxy
HAproxy RPM spec and builds for CentOS 6/7
Stars: ✭ 103 (-24.26%)
Mutual labels:  rpm
Archfi
Arch Linux Fast Installer : tutorial installer
Stars: ✭ 2,156 (+1485.29%)
Mutual labels:  install
Action Android
Collection of Android-related GitHub Actions
Stars: ✭ 116 (-14.71%)
Mutual labels:  install
Electron Builder
A complete solution to package and build a ready for distribution Electron app with “auto update” support out of the box
Stars: ✭ 11,653 (+8468.38%)
Mutual labels:  rpm
Docker Ce Packaging
Packaging scripts for Docker CE
Stars: ✭ 111 (-18.38%)
Mutual labels:  rpm
Clickhouse Rs
Asynchronous ClickHouse client library for Rust programming language.
Stars: ✭ 113 (-16.91%)
Mutual labels:  clickhouse
Discord
RPM Package for discord
Stars: ✭ 122 (-10.29%)
Mutual labels:  rpm
Nvm
nvm is a version manager for node.js, designed to be installed per-user, and invoked per-shell. nvm works on any POSIX-compliant shell (sh, dash, ksh, zsh, bash), in particular on these platforms: unix, macOS, and windows WSL.
Stars: ✭ 53,926 (+39551.47%)
Mutual labels:  install
Pandahouse
Pandas interface for Clickhouse database
Stars: ✭ 126 (-7.35%)
Mutual labels:  clickhouse
Sbt Native Packager
sbt Native Packager
Stars: ✭ 1,480 (+988.24%)
Mutual labels:  rpm
Apijson
🚀 零代码、热更新、全自动 ORM 库,后端接口和文档零代码,前端(客户端) 定制返回 JSON 的数据和结构。 🚀 A JSON Transmission Protocol and an ORM Library for automatically providing APIs and Docs.
Stars: ✭ 12,559 (+9134.56%)
Mutual labels:  clickhouse
Aliddns
aliyun ddns for golang【阿里云DDNS服务,用来将自己的动态IP同步到自己的域名解析服务器,安装方便,配置简单,默认支持Linux和MacOS以后台服务方式持续运行】
Stars: ✭ 136 (+0%)
Mutual labels:  rpm
Rpmvenv
RPM packager for Python virtualenv.
Stars: ✭ 128 (-5.88%)
Mutual labels:  rpm
Sqli
orm sql interface, Criteria, CriteriaBuilder, ResultMapBuilder
Stars: ✭ 1,644 (+1108.82%)
Mutual labels:  clickhouse

How to Install ClickHouse with RPM packages from Altinity's repo(s)


Table of Contents


What is this

This is a detailed explanation on how to install ready-to-use ClickHouse RPMs from Altinity's repos (either general repo or stable repo) located on packagecloud.io. This is not an instructions on how to build your own hand-made RPMs. However, if you need to build your own RPMs, there is a detailed explanation on how to build ClickHouse RPMs from sources with the help of Altinity's RPM builder

Introduction

general and stable repos

Altinity provides two repos:

  • general repo with general ClickHouse releases.
  • stable repo with Altinity Stable ClickHouse releases.

Supported OSes

All instructions in this manual were tested on Centos 6.10, CentOS 7.5 and Amazon Linux 2.

IMPORTANT for Amazon Linux users Amazon Linux is being detected as CentOS 6, while RPMs built for CentOS 7 are the best choice. So we need to explicitly install CentOS 7 RPMs More details further in the doc.

Register repo

In order to install ClickHouse RPM packages from Altinity's repo, we need to register it (repo) with our yum, making yum aware of additional packages installable from external source.

In general, repositories are listed in /etc/yum.repos.d folder, so we need to add Altinity's repo 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.

IMPORTANT for Amazon Linux users Amazon Linux is being detected as CentOS 6 by the script, so we need to explicitly instruct it to use CentOS 7 repo.

  • In case of manual installation, just use EL7 repo file. It is compatible with Amazon Linux
  • In case of script-based installation, script provided by packagecloud should be explicitly instructed to use CentOS 7 repo, instead of CentOS 6 repo, which is being used by default for Amazon Linux. More details further in the doc.

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 shell script. We'll need to download and run packagecloud's shell script, which will do all required steps.

Install dependencies

Installation process requires curl in order to download packages. ClickHouse test package has some dependencies in EPEL, so epel-release has to be installed as well, in case you'd like to install ClickHouse test package. Some installations do not have sudo installed, so we need to ensure it is availbale also.

Ensure sudo is available:

yum install -y sudo

Ensure curl is available:

sudo yum install -y curl
# in case test package would be installed, add epel-release
sudo yum install -y epel-release

Let's download and run installation shell script, provided by packagecloud.io. First of all, we need to point what script (from general or stable repo) we'll be using:

# For 'general' repo use this URL:
SCRIPT_URL="https://packagecloud.io/install/repositories/altinity/clickhouse/script.rpm.sh"

# For 'stable' repo use this URL:
SCRIPT_URL="https://packagecloud.io/install/repositories/altinity/clickhouse-altinity-stable/script.rpm.sh"

Now we can register Altiniry's repo in the system by running appropriate script.

for CentOS 6 and 7:

curl -s "${SCRIPT_URL}" | sudo bash

for Amazon Linux:

curl -s "${SCRIPT_URL}" | sudo os=centos dist=7 bash

pay attention to os=centos dist=7 explicitly specified.

At this point we have yum aware of additional RPM packages available.

We are ready to install ClickHouse.

Install packages

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            19.13.3.26-1.el7      Altinity_clickhouse
clickhouse-common-static.x86_64     19.13.3.26-1.el7      Altinity_clickhouse
clickhouse-compressor.x86_64        1.1.54336-3.el7       Altinity_clickhouse
clickhouse-debuginfo.x86_64         19.13.3.26-1.el7      Altinity_clickhouse
clickhouse-odbc.x86_64              1.0.0.20190611-1      Altinity_clickhouse
clickhouse-server.x86_64            19.13.3.26-1.el7      Altinity_clickhouse
clickhouse-server-common.x86_64     19.13.3.26-1.el7      Altinity_clickhouse
clickhouse-test.x86_64              19.13.3.26-1.el7      Altinity_clickhouse

There are multiple packages available (new versions and old tools as well), some of them are deprecated already, so there is no need to install all available RPMs.

Now let's install ClickHouse main parts - server and client applications.

Install latest ClickHouse version

In case we'd like to just install latest ClickHouse (it is so in most cases), we can simply install clickhouse-server and clickhouse-client as following:

sudo yum install -y clickhouse-server clickhouse-client

However, sometimes we'd like to install specific version of ClickHouse.

Install specific ClickHouse version

We can either just want to install latest version from specific branch, or we may know what ClickHouse version we'd like to install exactly, or we can look over availbale (older) versions available for installation. These cases are little bit different, let's take a look on both of them.

Select latest version from specific branch

In case we'd like to install latest version of 19.11.X.Y family, we can list available latest 19.11.* packages

sudo yum list 'clickhouse*19.11.*'

We'll see packages of one proposed version (latest) only:

Available Packages
clickhouse-client.x86_64         19.11.9.52-1.el7
clickhouse-common-static.x86_64  19.11.9.52-1.el7
clickhouse-debuginfo.x86_64      19.11.9.52-1.el7
clickhouse-server.x86_64         19.11.9.52-1.el7
clickhouse-server-common.x86_64  19.11.9.52-1.el7
clickhouse-test.x86_64           19.11.9.52-1.el7

Select specific version from specific branch

In case we'd like to see all available versions of 19.11.X.Y family, then select preferred version out of availbale for installation:

sudo yum list 'clickhouse*19.11.*' --showduplicates

We'll see all available package versions from 19.11.X.Y family:

Available Packages
clickhouse-client.x86_64         19.11.2.7-1.el7
clickhouse-client.x86_64         19.11.3.11-1.el7
clickhouse-client.x86_64         19.11.4.24-1.el7
clickhouse-client.x86_64         19.11.6.31-1.el7
clickhouse-client.x86_64         19.11.7.40-1.el7
clickhouse-client.x86_64         19.11.8.46-1.el7
clickhouse-client.x86_64         19.11.9.52-1.el7
clickhouse-common-static.x86_64  19.11.2.7-1.el7
clickhouse-common-static.x86_64  19.11.3.11-1.el7
clickhouse-common-static.x86_64  19.11.4.24-1.el7
clickhouse-common-static.x86_64  19.11.6.31-1.el7
...
and more

Install specific version

By now, we have picked up specific version (out of available) - let's install it:

sudo yum install -y clickhouse-server-19.11.7.40 clickhouse-client-19.11.7.40

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                 19.11.7.40-1.el7           @Altinity_clickhouse
clickhouse-common-static.x86_64          19.11.7.40-1.el7           @Altinity_clickhouse
clickhouse-server.x86_64                 19.11.7.40-1.el7           @Altinity_clickhouse
clickhouse-server-common.x86_64          19.11.7.40-1.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 server should respond, something like this:

ClickHouse client version 19.11.7.40.
Connecting to localhost:9000 as user default.
Connected to ClickHouse server version 19.11.7 revision 54423.

ip-172-31-37-226.ec2.internal :)

Well, all looks fine and ClickHouse installed from RPM packages!

We are all done!

Manual installation

Let's add any of Altinity's repos - general or stable manually

Install required packages

We'll need the following packages installed beforehands:

  • pygpgme - helps handling gpg-signatures
  • yum-utils - contains tools for handling source RPMs
  • coreutils - contains core utils and we'll need tee command later
  • epel-release - contains ClickHouse test package dependencies
sudo yum install -y pygpgme yum-utils coreutils epel-release

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.

# For 'general' repo use this URL
BASE_URL="https://packagecloud.io/altinity/clickhouse"

# For 'stable' repo use this URL
BASE_URL="https://packagecloud.io/altinity/clickhouse-altinity-stable"

EL6 repo file

EL6 (do NOT use with Amazon Linux) ready-to-copy+paste command to create yum's repo config file.
It writes /etc/yum.repos.d/altinity_clickhouse.repo file:

cat <<EOF | sudo tee /etc/yum.repos.d/altinity_clickhouse.repo
[altinity_clickhouse]
name=altinity_clickhouse
baseurl=${BASE_URL}/el/6/\$basearch
repo_gpgcheck=1
gpgcheck=0
enabled=1
gpgkey=${BASE_URL}/gpgkey
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
metadata_expire=300

[altinity_clickhouse-source]
name=altinity_clickhouse-source
baseurl=${BASE_URL}/el/6/SRPMS
repo_gpgcheck=1
gpgcheck=0
enabled=1
gpgkey=${BASE_URL}/gpgkey
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
metadata_expire=300
EOF

EL7 repo file

EL7 and Amazon Linux ready-to-copy+paste command to create yum's repo config file.
It writes /etc/yum.repos.d/altinity_clickhouse.repo file:

cat <<EOF | sudo tee /etc/yum.repos.d/altinity_clickhouse.repo
[altinity_clickhouse]
name=altinity_clickhouse
baseurl=${BASE_URL}/el/7/\$basearch
repo_gpgcheck=1
gpgcheck=0
enabled=1
gpgkey=${BASE_URL}/gpgkey
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
metadata_expire=300

[altinity_clickhouse-source]
name=altinity_clickhouse-source
baseurl=${BASE_URL}/el/7/SRPMS
repo_gpgcheck=1
gpgcheck=0
enabled=1
gpgkey=${BASE_URL}/gpgkey
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
metadata_expire=300
EOF

Update cache

After repo files created, let's update yum's cache with packges from newly added repo

sudo yum -q makecache -y --disablerepo='*' --enablerepo='altinity*'

Install packages manually

Packages can be installed the same way as in section Install packages after script-based installation.

Conclusion

Now we have ClickHouse RPM packages available for easy installation.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].