centos安装clickhouse

  |   0 评论   |   0 浏览

#关闭防火墙

systemctl stop firewalld.service #停止firewall
systemctl disable firewalld.service #禁止firewall开机启动

#关闭磁盘缓存swap

free -g

cat /proc/vmstat | egrep "dirty|writeback"

sysctl -w vm.swappiness=0

echo "vm.swappiness = 0">> /etc/sysctl.conf

swapoff -a

free -g

sysctl -p

free -g

#挂载磁盘
mkdir /data
fdisk /dev/sdb -> n -> p -> w
mkfs -t ext4 /dev/sdb
mount /dev/sdb /data
#自动挂载
nano /etc/fstab

/dev/sdb /data ext4 defaults 0 0
df -h

#更新系统
yum update -y
#下载clickhouse安装脚本并运行
curl -s "https://packagecloud.io/install/repositories/altinity/clickhouse/script.rpm.sh" | bash
#验证
yum list 'clickhouse*'
#安装
yum install -y clickhouse-server clickhouse-client

#修改配置 - 百度 - 主要是可用内存、默认帐号密码
nano /etc/clickhouse-server/config.xml
nano /etc/clickhouse-server/users.xml

#启动
service clickhouse-server restart, start, stop

#验证
clickhouse-client

show databases;

use xxx;

show tables;


标题:centos安装clickhouse
作者:zytops
地址:https://zytops.com/articles/2020/12/04/1607052251471.html