第二章 ClickHouse的安装(一)

一、系统配置(CentOS7)
  1. 主机名更改
> vi /etc/hostname
  1. 静态IP配置
> vi /etc/sysconfig/network-scripts/ifcfg-ens32
ONBOOT=yes
IPADDR=192.168.79.181/182/183
NETMASK=255.255.255.0
GATEWAY=192.168.79.2
DNS1=119.29.29.29
DNS2=8.8.8.8
> service network restart
  1. 时区配置
> rm -rf /etc/localtime
> ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
> vi /etc/sysconfig/clock
ZONE="Asia/Shanghai"
UTC=false
ARC=false
> yum install -y ntp
> systemctl start ntpd
> systemctl enable ntpd
> ntpdate -u  pool.ntp.org
> hwclock --systohc
> vi /etc/rc.d/rc.local
/usr/sbin/ntpdate ntp1.aliyun.com > /dev/null 2>&1; /sbin/hwclock -w
> crontab -e
0 */1 * * * ntpdate ntp1.aliyun.com > /dev/null 2>&1; /sbin/hwclock -w
  1. 关闭防火墙
> systemctl stop firewalld
> systemctl disable firewalld
  1. 取消文件数限制
> vi /etc/security/limits.conf
* soft nofile 65536
* hard nofile 65536
* soft nproc 131072
* hard nproc 131072
> vi /etc/security/limits.d/20-nproc.conf
* soft nofile 65536
* hard nofile 65536
* soft nproc 131072
* hard nproc 131072
> ulimit -a
  1. 安装依赖
> yum install -y libtool
> yum install -y *unixODBC*
  1. 关闭selinux
> setenforce 0
> vi /etc/sysconfig/selinux
SELINUX=disabled
> getenforce
  1. 一些必要依赖
> yum -y install unzip
> yum -y install lrzsz
> yum -y install wget
  1. hadoop用户的创建与sudo权限设置
> adduser hadoop
> passwd hadoop
> ll /etc/sudoers
> chmod 777 /etc/sudoers
> echo 'hadoop ALL=(ALL) ALL' >> /etc/sudoers
> chmod 440 /etc/sudoers
> su hadoop
> visudo
> sudo visudo
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容