ClickHouse实战第二章-ClickHouse 的安装调试

2 ClickHouse 的安装

防火墙

关闭防火墙

shell 复制代码
systemctl stop firewalld.service
systemctl disable firewalld.service

关闭selinux

shell 复制代码
systemctl stop firewalld.service
systemctl disable firewalld.service

下载安装使用

下载:

shell 复制代码
https://packages.clickhouse.com/tgz/stable/
[root@localhost home]# wget https://packages.clickhouse.com/tgz/stable/clickhouse-common-static-22.9.7.34-amd64.tgz

[root@localhost home]# ll
total 228692
-rw-r--r--.  1 root   root       82782 Dec 26 20:34 clickhouse-client-22.9.7.34-amd64.tgz
-rw-r--r--.  1 root   root   233982749 Dec 16 04:27 clickhouse-common-static-22.9.7.34-amd64.tgz
-rw-r--r--.  1 root   root      105857 Dec 26 20:32 clickhouse-server-22.9.7.34-amd64.tgz

解压:

shell 复制代码
[root@localhost home]# tar -zxvf clickhouse-common-static-22.9.7.34-amd64.tgz 
[root@localhost home]# tar -zxvf clickhouse-server-22.9.7.34-amd64.tgz 
[root@localhost home]# tar -xvf clickhouse-client-22.9.7.34-amd64.tgz 

安装:

shell 复制代码
[root@localhost install]# sh /home/clickhouse-common-static-22.9.7.34/install/doinst.sh
[root@localhost install]# sh /home/clickhouse-server-22.9.7.34/install/doinst.sh
[root@localhost install]# sh /home/clickhouse-client-22.9.7.34/install/doinst.sh

配置:

shell 复制代码
[root@localhost install]# vim /etc/clickhouse-server/config.xml 

(1)把 <listen_host>::</listen_host> 的注释打开,这样的话才能让 ClickHouse 被除本
机以外的服务器访问

(2)配置文件
在这个文件中,有 ClickHouse 的一些默认路径配置,比较重要的
数据文件路径:<path>/var/lib/clickhouse/</path>
日志文件路径:<log>/var/log/clickhouse-server/clickhouse-server.log</log>

启动:

shell 复制代码
 # 启动 ClickHouse
 systemctl start clickhouse-server
 # 停止 ClickHouse
 systemctl stop clickhouse-server
 # 查看状态 ClickHouse
 systemctl status clickhouse-server

使用:

shell 复制代码
#客户端连接输入密码
[root@localhost install]# clickhouse-client --password 

[root@localhost install]# clickhouse-client -h 192.168.235.128 -u default --password 123456 --port 9000 -m
ClickHouse client version 22.9.7.34 (official build).
Connecting to 192.168.235.128:9000 as user default.
Connected to ClickHouse server version 22.9.7 revision 54460.
相关推荐
来鸟 鸣间6 分钟前
vscode 连接远程服务器
服务器·ide·vscode
伤不起bb24 分钟前
Kafka 消息队列
linux·运维·分布式·kafka
Hello.Reader35 分钟前
Git 安装全攻略Linux、macOS、Windows 与源码编译
linux·git·macos
龙仔72537 分钟前
华为云CentOS配置在线yum源,连接公网后,逐步复制粘贴,看好自己对应的版本即可,【新手必看】
linux·centos·华为云
tiging39 分钟前
centos实现SSH远程登录
linux·centos·ssh
Wooden-Flute1 小时前
五、查询处理和查询优化
服务器·数据库·oracle
好多知识都想学2 小时前
Linux 文件处理器 sed 和 awk 详细讲解
linux·运维·ubuntu
Johny_Zhao2 小时前
阿里云数据库Inventory Hint技术分析
linux·mysql·信息安全·云计算·系统运维
FBI HackerHarry浩2 小时前
云计算 Linux Rocky day05【rpm、yum、history、date、du、zip、ln】
linux·运维·云计算·腾讯云
敲键盘的小夜猫2 小时前
RunnablePassthrough介绍和透传参数实战
java·服务器·前端