# Clickhouse on centos 基本 安装 配置 防火墙 设置

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>
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值