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.
相关推荐
一位摩羯座DBA1 小时前
Redhat&Centos挂载镜像
linux·运维·centos
学习3人组1 小时前
CentOS配置网络
linux·网络·centos
计算机毕设定制辅导-无忧学长1 小时前
西门子 PLC 与 Modbus 集成:S7-1500 RTU/TCP 配置指南(一)
服务器·数据库·tcp/ip
weixin_307779131 小时前
Hive集群之间迁移的Linux Shell脚本
大数据·linux·hive·bash·迁移学习
漫步企鹅2 小时前
【蓝牙】Linux Qt4查看已经配对的蓝牙信息
linux·qt·蓝牙·配对
cui_win2 小时前
【网络】Linux 内核优化实战 - net.core.flow_limit_table_len
linux·运维·网络
梦在深巷、2 小时前
MySQL/MariaDB数据库主从复制之基于二进制日志的方式
linux·数据库·mysql·mariadb
冰橙子id3 小时前
linux系统安全
linux·安全·系统安全
stark张宇3 小时前
VMware 虚拟机装 Linux Centos 7.9 保姆级教程(附资源包)
linux·后端
Johny_Zhao3 小时前
Ubuntu系统安装部署Pandawiki智能知识库
linux·mysql·网络安全·信息安全·云计算·shell·yum源·系统运维·itsm·pandawiki