clickhouse安装极简教程

  • clickhouse 20.8.3.18版本单机版安装
# 安装curl工具
yum install -y curl
# 添加clickhouse的yum镜像
curl -s https://packagecloud.io/install/repositories/altinity/clickhouse/script.rpm.sh | sudo bash
# 检查镜像情况
yum list | grep clickhouse
# 安装clickhouse的服务端和客户端
yum install -y clickhouse-server clickhouse-client
  • clickhouse常用命令
# 启动服务端
service clickhouse-server start
# 启动交互式客户端
clickhouse-client
	show databases;
# 启动新增用户后启动交互模式
clickhouse-client -h 127.0.0.1 -u admin  --password 123456
# 查看启动状态
service clickhouse-server status 
# 停止
service clickhouse-server stop
# 重启
service clickhouse-server restart
# 添加开机启动
chkconfig clickhouse-server on
  • 开启运行外部ip访问
vim /etc/clickhouse-server/config.xml
	# 打开注解
	<listen_host>0.0.0.0</listen_host>
  • 添加admin用户
vim /etc/clickhouse-server/users.xml
# 新增admin标签的内容到已有的users标签下
<users>
      <admin>
        <password>123456password>
        <access_management>1access_management>
        <networks incl="networks" replace="replace">
                <ip>::/0ip>
        networks>
        <profile>defaultprofile>
        <quota>defaultquota>
      admin>
users>

你可能感兴趣的:(clickhouse,入门实战,数据库,大数据,数据分析,数据仓库)