安装
rpm包安装
添加官方存储库
1 2 3
| yum install -y yum-utils rpm --import https://repo.clickhouse.tech/CLICKHOUSE-KEY.GPG yum-config-manager --add-repo https://repo.clickhouse.tech/rpm/stable/x86_64
|
如果想使用最新的版本,最后一个命令中的stable用 testing替代(只推荐用于测试环境)。prestable
有时也可用
进行安装
1
| yum install -y clickhouse-server clickhouse-client
|
设为开启启动
1
| systemctl enable clickhouse-server
|
启动/重启/关闭clickhouse
1 2 3 4
| systemctl start clickhouse-server systemctl status clickhouse-server # 运行状态 可以看到配置文件和pid文件地址等信息 systemctl restart clickhouse-server systemctl stop clickhouse-server
|
clickhouse命令
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
| clickhouse local [args] clickhouse client [args] clickhouse benchmark [args] clickhouse server [args] clickhouse extract-from-config [args] clickhouse compressor [args] clickhouse format [args] clickhouse copier [args] clickhouse obfuscator [args] clickhouse git-import [args] clickhouse install [args] clickhouse start [args] clickhouse stop [args] clickhouse status [args] clickhouse restart [args] clickhouse hash-binary [args]
|