(1)在 hadoop101 的 /etc/security/limits.conf 文件的末尾加入以下内容
sudo vim /etc/security/limits.conf
(2)在 hadoop101 的/etc/security/limits.d/20-nproc.conf 文件的末尾加入以下内容
sudo vim /etc/security/limits.d/20-nproc.conf
(3)执行同步操作
sudo /home/atguigu/bin/xsync.sh /etc/security/limits.conf
sudo /home/atguigu/bin/xsync.sh /etc/security/limits.d/20-nproc.conf
sudo yum install -y libtool
sudo yum install -y *unixODBC*
在 hadoop103、hadoop104 上执行以上操作
SELINUX :Linux的安全增强,内核级别
(1)修改/etc/selinux/config 中的 SELINUX=disabled
[root@hadoop102 ~]$ sudo vim /etc/selinux/config
SELINUX=disabled
注意:别改错了
(2)执行同步操作
[root@hadoop102 ~]$ sudo /home/atguigu/bin/xsync.sh /etc/selinux/config
(3)重启三台服务器
官网:Fast Open-Source OLAP DBMS - ClickHouse
下载地址:Index of /repos/clickhouse/stable/el7
[root@hadoop101 clickhouse]$ pwd
/home/atguigu/clickhouse
[root@hadoop101 clickhouse]$ ll
总用量 938164
-rw-r--r-- 1 root root ? ? 78074 7月 ?27 08:41 clickhouse-client-21.7.3.14-2.noarch.rpm
-rw-r--r-- 1 root root 174283244 7月 ?27 08:42 clickhouse-common-static-21.7.3.14-2.x86_64.rpm
-rw-r--r-- 1 root root 786208040 7月 ?27 08:45 clickhouse-common-static-dbg-21.7.3.14-2.x86_64.rpm
-rw-r--r-- 1 root root ? ?101969 7月 ?27 08:40 clickhouse-server-21.7.3.14-2.noarch.rpm
[root@hadoop101 ~]$ mv clickhouse /opt/software/
[root@hadoop101 ~]$ xsync.sh /opt/software/clickhouse
sudo rpm -ivh *.rpm
sudo rpm -qa|grep clickhouse 查看安装情况
安装后clickhouse相对于的文件:
bin/ ?-> /usr/bin
conf/ -> /etc/clockhouse-server/
lib/ ?-> /var/lib/clickhouse
log/ ?-> /var/log/clickhouse
sudo vim /etc/clickhouse-server/config.xml
(1)把 :: 的注释打开,这样的话才能让 ClickHouse 被除本 机以外的服务器访问
(2)分发配置文件
sudo /home/atguigu/bin/xsync.sh /etc/clickhouse-server/config.xml
在这个文件中,有 ClickHouse 的一些默认路径配置,比较重要的
数据文件路径:/var/lib/clickhouse/
日志文件路径:/var/log/clickhouse-server/clickhouse-server.log
[root@hadoop101 ~]$ sudo systemctl start clickhouse-server
[root@hadoop101 ~]$ sudo clickhouse status
/var/run/clickhouse-server/clickhouse-server.pid file exists and contains pid = 16221.
The process with pid = 16221 is running.
[root@hadoop102 clickhouse]$ clickhouse-client -m
-m :可以在命令窗口输入多行命令
[root@hadoop101 clickHouse]# sudo rpm -qa|grep clickhouse
clickhouse-common-static-dbg-20.4.5.36-2.x86_64
clickhouse-common-static-20.4.5.36-2.x86_64
clickhouse-server-20.4.5.36-2.noarch
clickhouse-client-20.4.5.36-2.noarch
?
# 卸载及删除安装文件(需root权限)
yum list installed | grep clickhouse
yum remove -y clickhouse-common-static
yum remove -y clickhouse-server-common
rm -rf /var/lib/clickhouse
rm -rf /etc/clickhouse-*
rm -rf /var/log/clickhouse-server