ITPub博客

首页 > 数据库 > MySQL > clickhouse下载和安装

clickhouse下载和安装

原创 MySQL 作者:水逸冰 时间:2020-12-27 11:49:41 0 删除 编辑

clickhouse下载和安装

1.安装包下载

wget --content-disposition 

wget --content-disposition
wget --content-disposition
wget --content-disposition

下载好的安装包

[root@mdb01 clickhouse]# ll

total 103412
-rw-r--r-- 1 clickhouse clickhouse     6384 Oct  6 06:32 clickhouse-client-20.8.3.18-1.el7.x86_64.rpm
-rw-r--r-- 1 clickhouse clickhouse 69093220 Oct  6 06:32 clickhouse-common-static-20.8.3.18-1.el7.x86_64.rpm
-rw-r--r-- 1 clickhouse clickhouse 36772044 Oct  6 06:36 clickhouse-server-20.8.3.18-1.el7.x86_64.rpm
-rw-r--r-- 1 clickhouse clickhouse    14472 Oct  6 06:36 clickhouse-server-common-20.8.3.18-1.el7.x86_64.rpm

也可以直接配置yum源的方式

curl -s | sudo bash

2.安装clickhouse

[root@mdb01 clickhouse]# rpm -ivh clickhouse*

Preparing...                          ################################# [100%]
Updating / installing...
  1:clickhouse-server-common-20.8.3.1################################# [ 25%]
  2:clickhouse-common-static-20.8.3.1################################# [ 50%]
  3:clickhouse-server-20.8.3.18-1.el7################################# [ 75%]
Create user clickhouse.clickhouse with datadir /var/lib/clickhouse
  4:clickhouse-client-20.8.3.18-1.el7################################# [100%]
Create user clickhouse.clickhouse with datadir /var/lib/clickhouse

修改数据目录:

# cd /etc/clickhouse-server/

# ll
total 44
-rw-r--r-- 1 root root 33738 Oct  6 06:05 config.xml
-rw-r--r-- 1 root root  5587 Oct  6 06:05 users.xml
# more config.xml |grep -B1 '/u01/clickhouse'
   <!-- Path to data directory, with trailing slash. -->
   <path>/u01/clickhouse/data/</path>
--
   <!-- Path to temporary data for processing hard queries. -->
   <tmp_path>/u01/clickhouse/tmp/</tmp_path>
--
   <!-- Directory with user provided files that are accessible by 'file' table function. -->
   <user_files_path>/u01/clickhouse/user_files/</user_files_path>
--
     -->
   <format_schema_path>/u01/clickhouse/format_schemas/</format_schema_path>

3.启动clickhouse

nohup clickhouse-server --config-file=/etc/clickhouse-server/config.xml &

4.连接clickhouse

[clickhouse@mdb01 clickhouse]$ clickhouse-client 

ClickHouse client version 20.8.3.18.
Connecting to localhost:9000 as user default.
Connected to ClickHouse server version 20.8.3 revision 54438.

mdb01 :) show databases;

SHOW DATABASES

┌─name───────────────────────────┐
│ _temporary_and_external_tables │
│ default                        │
│ system                         │
└────────────────────────────────┘

3 rows in set. Elapsed: 0.002 sec.



来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/31480688/viewspace-2745701/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
精通oracle,mysql和linux,热衷于研究数据库,擅长shell和Python自动化运维。VX:18302174682

注册时间:2017-08-05

  • 博文量
    108
  • 访问量
    123328