当前位置:   article > 正文

ClickHouse安装部署_file /usr/bin/clickhouse-extract-from-config.old a

file /usr/bin/clickhouse-extract-from-config.old already exists but it's not

通过RPM安装

ip:192.168.4.186

安装前准备

验证当前服务器CPU是否支持SSE 4.2指令集

grep -q sse4_2 /proc/cpuinfo && echo "SSE 4.2 supported" || echo "SSE 4.2 not supported"
  • 1

获取安装包

由于网路不通,只能手动下载传输到测试机。

下载地址:https://repo.yandex.ru/clickhouse/rpm/stable/x86_64/

下载了四个组件:clickhouse-client-21.9.7.2-2.noarch.rpm,clickhouse-common-static-21.9.7.2-2.x86_64.rpm,clickhouse-server-21.9.7.2-2.noarch.rpm,clickhouse-common-static-dbg-21.9.7.2-2.x86_64.rpm

clickhouse-common-static — ClickHouse编译的二进制文件。
clickhouse-server — 创建clickhouse-server软连接,并安装默认配置服务
clickhouse-client — 创建clickhouse-client客户端工具软连接,并安装客户端配置文件。
clickhouse-common-static-dbg — 带有调试信息的ClickHouse二进制文件。

本次测试只安装clickhouse-client-21.9.7.2-2.noarch.rpm,clickhouse-common-static-21.9.7.2-2.x86_64.rpm,clickhouse-server-21.9.7.2-2.noarch.rpm即可。

安装&启动

安装(此步骤会需要设置登录密码)

[root@hadoop4 clickhouse]# ll
total 279744
-rw-r--r-- 1 root root  98243044 Jan 12 15:34 ClickHouse-21.11.9.1-stable.tar.gz
-rw-r--r-- 1 root root     91312 Jan 12 15:42 clickhouse-client-21.9.7.2-2.noarch.rpm
-rw-r--r-- 1 root root 187997076 Jan 12 15:47 clickhouse-common-static-21.9.7.2-2.x86_64.rpm
-rw-r--r-- 1 root root    114929 Jan 12 15:43 clickhouse-server-21.9.7.2-2.noarch.rpm
[root@hadoop4 clickhouse]# rpm -ivh *.rpm
warning: clickhouse-client-21.9.7.2-2.noarch.rpm: Header V4 RSA/SHA1 Signature, key ID e0c56bd4: NOKEY
Preparing...                          ################################# [100%]
Updating / installing...
   1:clickhouse-common-static-21.9.7.2################################# [ 33%]
   2:clickhouse-client-21.9.7.2-2     ################################# [ 67%]
   3:clickhouse-server-21.9.7.2-2     ################################# [100%]
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.
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.
 chown --recursive clickhouse:clickhouse '/etc/clickhouse-server'
Creating log directory /var/log/clickhouse-server/.
Creating data directory /var/lib/clickhouse/.
Creating pid directory /var/run/clickhouse-server.
 chown --recursive clickhouse:clickhouse '/var/log/clickhouse-server/'
 chown --recursive 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 --recursive clickhouse-bridge:clickhouse-bridge '/usr/bin/clickhouse-odbc-bridge'
 chown --recursive 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.

ClickHouse has been successfully installed.

Start clickhouse-server with:
 sudo clickhouse start

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

Created symlink from /etc/systemd/system/multi-user.target.wants/clickhouse-server.service to /etc/systemd/system/clickhouse-server.service.
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68

开启

clickhouse start
  • 1

登录

clickhouse-client --password 123456          #123456是安装步骤设置的密码
  • 1

文件介绍

每个rpm安装生成的文件目录

#clickhouse-server
/usr/bin/clickhouse-server
/usr/bin/clickhouse-report
/usr/bin/clickhouse-odbc-bridge
/usr/bin/clickhouse-obfuscator
/usr/bin/clickhouse-format
/usr/bin/clickhouse-copier
/etc/security/limits.d/clickhouse.conf
/etc/init.d/clickhouse-server
/etc/cron.d/clickhouse-server

#clickhouse-common-static
/usr/bin/clickhouse
/etc/security/limits.d/clickhouse.conf

#clickhouse-client
/usr/bin/clickhouse-local
/usr/bin/clickhouse-extract-from-config
/usr/bin/clickhouse-compressor
/usr/bin/clickhouse-client
/usr/bin/clickhouse-benchmark
/etc/clickhouse-client/config.xml

启动service 生成的目录文件

/etc/clickhouse-server:配置文件目录,包括:config.xml和users.xml

/etc/clickhouse-client:客户端配置文件目录

/var/lib/clickhouse:默认数据目录

/var/log/clickhouse-server:默认日志目录

/etc/init.d/clickhouse-server:启动shell脚本

/etc/security/limits.d/clickhouse.conf:最大文件打开数的配置

/etc/cron.d/clickhouse-server:定时任务配置,默认没有任务

/usr/bin/clickhouse-client:clickhouse客户端

本文内容由网友自发贡献,转载请注明出处:【wpsshop博客】
推荐阅读
相关标签
  

闽ICP备14008679号