Clickhouse on centos 基本 安装 配置 防火墙 设置
auth:wangjing
date:2021-03-24
安装clickhouse
curl https://packagecloud.io/install/repositories/altinity/clickhouse/script.rpm.sh | sudo bash
yum list | grep clickhouse
yum install clickhouse-server
yum install clickhouse-client
# 1号官方坑
rpm --import https://repo.clickhouse.tech/CLICKHOUSE-KEY.GPG
yum-config-manager --add-repo https://repo.clickhouse.tech/rpm/stable/x86_64
yum install clickhouse-server
yum install clickhouse-client
clickhouse operation
service clickhouse-server status
service clickhouse-server start
service clickhouse-server stop
service clickhouse-server restart
service clickhouse-server forcestop
service clickhouse-server forcerestart
service clickhouse-server reload
service clickhouse-server condstart
service clickhouse-server condstop
service clickhouse-server condrestart
service clickhouse-server condreload
service clickhouse-server initdb
# 2号官方坑
/etc/init.d/clickhouse-server {start|stop|status|restart|forcestop|forcerestart|reload|condstart|condstop|condrestart|condreload|initdb}
/etc/init.d/clickhouse-server start
/etc/init.d/clickhouse-server status
# 基于systemd的发行版? 未确认
# 看来您正在使用基于systemd的发行版。
# 仅使用systemctl命令
# 并且不要使用服务clickhouse-server或/etc/init.d/clickhouse-service
sudo systemctl start clickhouse-server
sudo systemctl stop clickhouse-server
sudo systemctl status clickhouse-server
连接clickhouse
clickhouse-client -u default -m --password
关闭防火墙
# 查看默认防火墙状态
firewall-cmd --state
# 查看防火墙状态
systemctl status firewalld.service
# 关闭防火墙
systemctl stop firewalld.service
# 重启firewall
firewall-cmd --reload
# 查看开放端口
firewall-cmd --list-ports
# 添加开放端口
firewall-cmd --zone=public --add-port=80/tcp --permanent
修改配置
取消注释
<listen_host>::</listen_host>