Clickhouse的极简安装-之二(macos+linux)
Clickhouse的极简安装-之二(macos+linux)
StudyFrom
https://clickhouse.com/docs/en/install
然后简单的获取方式:
curl https://clickhouse.com/ > ck.url
其实可以看到他的安装命令了.
命令拆解
if [ "${OS}" = "Linux" ]
then
if [ "${ARCH}" = "x86_64" -o "${ARCH}" = "amd64" ]
then
# Require at least x86-64 + SSE4.2 (introduced in 2006). On older hardware fall back to plain x86-64 (introduced in 1999) which
# guarantees at least SSE2. The caveat is that plain x86-64 builds are much less tested than SSE 4.2 builds.
HAS_SSE42=$(grep sse4_2 /proc/cpuinfo)
if [ "${HAS_SSE42}" ]
then
DIR="amd64"
else
DIR="amd64compat"
fi
elif [ "${ARCH}" = "aarch64" -o "${ARCH}" = "arm64" ]
then
# If the system has >=ARMv8.2 (https://en.wikipedia.org/wiki/AArch64), choose the corresponding build, else fall back to a v8.0
# compat build. Unfortunately, the ARM ISA level cannot be read directly, we need to guess from the "features" in /proc/cpuinfo.
# Also, the flags in /proc/cpuinfo are named differently than the flags passed to the compiler (cmake/cpu_features.cmake).
HAS_ARMV82=$(grep -m 1 'Features' /proc/cpuinfo | awk '/asimd/ && /sha1/ && /aes/ && /atomics/ && /lrcpc/')
if [ "${HAS_ARMV82}" ]
then
DIR="aarch64"
else
DIR="aarch64v80compat"
fi
elif [ "${ARCH}" = "powerpc64le" -o "${ARCH}" = "ppc64le" ]
then
DIR="powerpc64le"
elif [ "${ARCH}" = "riscv64" ]
then
DIR="riscv64"
elif [ "${ARCH}" = "s390x" ]
then
DIR="s390x"
fi
elif [ "${OS}" = "FreeBSD" ]
then
if [ "${ARCH}" = "x86_64" -o "${ARCH}" = "amd64" ]
then
DIR="freebsd"
fi
elif [ "${OS}" = "Darwin" ]
then
if [ "${ARCH}" = "x86_64" -o "${ARCH}" = "amd64" ]
then
DIR="macos"
elif [ "${ARCH}" = "aarch64" -o "${ARCH}" = "arm64" ]
then
DIR="macos-aarch64"
fi
fi
二进制的洗洗
明显可以看到, 安装文件
linux 如果是x86架构: amd64
如果没有SSE42那么就是: amd64compat
linux 如果arm架构: aarch64
如果是飞腾架构: aarch64v80compat
macos 如果是x86的机器: macos
如果是m2的机器: macos-aarch64
获取精确的下载地址
https://builds.clickhouse.com/master/${DIR}/clickhouse
然后进行替换就可以了.
比如 linux机器的话 就是:
wget https://builds.clickhouse.com/master/amd64/clickhouse
linux的话可以直接使用命令或者是二进制进行安装
安装方式
将 clickhouse 二进制文件放到 /usr/bin 目录下
执行clickhouse install 就可以.
注意事项
最新的latest 的clickhouse 的二进制无法再鲲鹏上面运行
需要降级处理一下:
一般可以从如下网站进行下载 tar.gz包
https://repo.clickhouse.tech/tgz/stable/
需要注意 一般进需要 static 的那个包里面的clickhouse 文件.
与上一步安装方式完全一样.
1. 分发文件
scp /usr/bin/clickhouse root@192.168.255.64:/usr/bin/
2. 安装
clickhouse install
3. 测试验证
clickhouse-local -q "select 1"
1
注意安装的效果为:
ClickHouse binary is already located at /usr/bin/clickhouse
Creating symlink /usr/bin/clickhouse-server to /usr/bin/clickhouse.
Creating symlink /usr/bin/clickhouse-client to /usr/bin/clickhouse.
Creating symlink /usr/bin/clickhouse-local to /usr/bin/clickhouse.
Creating symlink /usr/bin/clickhouse-benchmark to /usr/bin/clickhouse.
Creating symlink /usr/bin/clickhouse-copier 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.
Creating symlink /usr/bin/clickhouse-compressor to /usr/bin/clickhouse.
Creating symlink /usr/bin/clickhouse-format to /usr/bin/clickhouse.
Creating symlink /usr/bin/clickhouse-extract-from-config 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.
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.
Data path configuration override is saved to file /etc/clickhouse-server/config.d/data-paths.xml.
Log path configuration override is saved to file /etc/clickhouse-server/config.d/logger.xml.
User directory path configuration override is saved to file /etc/clickhouse-server/config.d/user-directories.xml.
OpenSSL path configuration override is saved to file /etc/clickhouse-server/config.d/openssl.xml.
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'
Enter password for default user:
Password for default user is empty string. See /etc/clickhouse-server/users.xml and /etc/clickhouse-server/users.d to change it.
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
Clickhouse的极简安装-之二(macos+linux)的更多相关文章
- [软件开发技巧]·树莓派极简安装OpenCv
树莓派极简安装OpenCv 个人主页–> https://xiaosongshine.github.io/ 因为最近在开发使用树莓派+usb摄像头识别模块,打算用OpenCv,发现网上的树莓派O ...
- [深度学习工具]·极简安装Dlib人脸识别库
[深度学习工具]·极简安装Dlib人脸识别库 Dlib介绍 Dlib是一个现代化的C ++工具箱,其中包含用于在C ++中创建复杂软件以解决实际问题的机器学习算法和工具.它广泛应用于工业界和学术界,包 ...
- 在windows上极简安装GPU版AI框架(Tensorflow、Pytorch)
在windows上极简安装GPU版AI框架 如果我们想在windows系统上安装GPU版本的AI框架,比如GPU版本的tesnorflow,通常我们会看到类似下面的安装教程 官方版本 安装CUDA 安 ...
- centOS极简安装并启动ngnix
我在网上看到过很多种方法在centOS中安装nginx,比如像这样的: 这种方式太麻烦了,看了很恶心. 我在官网看到有这样一种操作,可谓极简.特此记录一下:(官网教程地址:http://nginx.o ...
- 小白的docker极简入门(二)、5分钟教你玩转docker安装
0-前言 上一篇中,我们已经安装后Linux了,我们需要在Linux下安装docker,然后才能在docker中安装和部署各种应用 同样,5分钟教你完成docker正确安装和使用, 不是纸上谈兵,不是 ...
- 『开发技术』Windows极简安装使用face_recognition
face_recognition是一个强大.简单.易上手的人脸识别开源项目,并且配备了完整的开发文档和应用案例,特别是兼容树莓派系统.此项目是世界上最简洁的人脸识别库,你可以使用Python和命令行工 ...
- 『TensorFlow2.0正式版教程』极简安装TF2.0正式版(CPU&GPU)教程
0 前言 TensorFlow 2.0,今天凌晨,正式放出了2.0版本. 不少网友表示,TensorFlow 2.0比PyTorch更好用,已经准备全面转向这个新升级的深度学习框架了. 本篇文章就 ...
- 极简安装 TensorFlow 2.0 GPU
前言 之前写了几篇关于 TensorFlow 1.x GPU 版本安装的博客,但几乎没怎么学习过.之前基本在搞 Machine Learning 和 Data Mining 方面的东西,极少用到 NN ...
- WordPress基础:极简安装教程
1.下载WordPress 2.将解压后的文件夹,放到网站根目录,并重命名为你喜欢的目录如:w, 3.重命名文件wp-config-sample.php 为 wp-config.php,并进行配置 4 ...
- Python 极简教程(二)编码工具
Python 的编码工具很多.目前最流行的是 pycharm,关于 pycharm 的安装使用请参考 PyCharm安装使用教程. 而学习过程中,我觉得最好用的,还是 Python 自带的练习工具 I ...
随机推荐
- C语言基础之四舍五入
要求:输入任意的2个小数:将这2个小数相加并显示结果:将结果按四舍五入方法转换成整数并显示. 0.0到0.4的数加上0.5不会进位,而0.5到0.9的数加上0.5会进位.所以可以依靠这个特点让计算后的 ...
- Android学习--ListView和Tab
产生一个ListView 其中包含很多items,第一个item启动另一个实现了Tab的Activity. 关于tab的使用方式,参见下面blog http://oldshark.blog.163.c ...
- 快速入门Mybatis完成基本CURD(注解实现)
一.什么是Mybatis? MyBatis 是一款优秀的持久层框架,它支持定制化 SQL.存储过程以及高级映射. MyBatis 避免了几乎所有的 JDBC 代码和手动设置参数以及获取结果集. MyB ...
- 【Pandas】groupby连用的count()和size()的区别
groupby连用的count()和size()的区别 count() 计算的是 value(数值): size() 计算的是 size(个数) 我们有以下表: size() age = df.gro ...
- 来喽,来喽,Python 3.9正式版发布了~~~
摘要:2020年10月5日,在全国人员欢度国庆节和中秋节时,Python 3.9 悄摸摸地正式发布了. 2020年10月5日,在全国人员欢度国庆节和中秋节时,Python 3.9 悄摸摸地正式发布了. ...
- 华为云联合多家单位正式开源云原生多沙箱容器运行时Kuasar
摘要:云原生多沙箱容器运行时Kuasar正式开源. 本文分享自华为云社区<重磅发布!华为云联合多家单位正式开源云原生多沙箱容器运行时Kuasar>,作者:云容器大未来. 当地时间4月21日 ...
- 跟我学丨如何用鲲鹏服务器搭建Hadoop全分布式集群
摘要:今天教大家如何利用鲲鹏服务器搭建Hadoop全分布式集群,动起来··· 一.Hadoop常见的三种运行模式 1.单机模式(独立模式)(Local或Standalone Mode) 默认情况下Ha ...
- max file descriptors [4096] for elasticsearch process is too low, increase to at least [65535]
elasticsearch安装后启动时候,遇到此问题 问题翻译过来就是:elasticsearch用户拥有的可创建文件描述的权限太低,至少需要65536: 解决办法: 切换到root用户修改 vim ...
- Jenkins Pipeline SSH Publisher 环境变量、参数引用 要用双引号
Jenkins Pipeline SSH Publisher 环境变量.参数引用 要用双引号 在 Pipeline 脚本中,如果要使用变量,就必须使用 " 双引号 pipeline { ag ...
- Go--发起HTTP请求
一.HTTP请求 根据 HTTP 标准,HTTP 请求可以使用多种请求方法.在日常开发中大多数会用到 5 种请求方法: GET.POST.PUT.PATCH 和 DELETE 方法 描述 GET 请求 ...