CDH5.16.2三节点安装部署

一.安装虚拟机,最小化安装

vm设置好虚拟网络之后,先去电脑网络设置,将vm net8的属性中Ipv4协议进行更改
dns设置为先前设置的网关192.168.253.2
配置好后进行虚拟机安装
安装好后在hosts下配置映射

二.安装cdh:

设置ip地址:vi /etc/sysconfig/network-scripts/ifcfg-ens33
删除默认路由:DEFROUTE=yes
删除UUID
设置开机启动ONBOOT=yes

设置IPADDR=192.168.253.101
vi /etc/sysconfig/network-scripts/ifcfg-ens33
BOOTPROTO=static
IPADDR=192.168.253.101
GATEWAY=192.168.253.2
DNS1=192.168.253.2
DNS2=8.8.8.8

重启网卡:service network restart

ping下外网是否正常

关闭NetworkManager
systemctl stop NetworkManager
systemctl disable NetworkManager

修改主机名和映射:

hostnamectl set-hostname cdh01 etc/hosts 添加192.168.253.101 cdh01
hostnamectl set-hostname cdh02 etc/hosts 添加192.168.253.102 cdh02
hostnamectl set-hostname cdh03 etc/hosts 添加192.168.253.103 cdh03

配置时间同步服务
主节点
yum install ntpd -y
vi /etc/ntp.conf
restrict 192.168.253.0 mask 255.255.255.0 nomodify notrap
#server 0.centos.pool.ntp.org iburst
#server 1.centos.pool.ntp.org iburst
#server 2.centos.pool.ntp.org iburst
#server 3.centos.pool.ntp.org iburst
server 127.127.1.0
fudge 127.127.1.0 stratum 1
时间同步外网
yum install ntpdate.x86_64 -y
ntpdate cn.pool.ntp.org
写入开机启动 chkconfig ntpdate on
其他节点安装yum install ntpdate.x86_64 -y
进行定时任务时间同步

配置免密登录(每个节点):
ssh-keygen -t rsa
cd .ssh
ssh-copy-id cdh01
ssh-copy-id cdh02
ssh-copy-id cdh03

设置虚拟化内存和禁用大叶内存(每个节点):
优化虚拟内存
echo ‘vm.swappiness = 0’ > /etc/sysctl.d/swappiness.conf
sysctl -p

禁用大叶内存
echo never > /sys/kernel/mm/transparent_hugepage/defrag
echo never > /sys/kernel/mm/transparent_hugepage/enabled
echo “echo never > /sys/kernel/mm/transparent_hugepage/enabled” >> /etc/rc.local
echo “echo never > /sys/kernel/mm/transparent_hugepage/defrag” >> /etc/rc.local
chmod u+x /etc/rc.local

关闭防火墙:
systemctl stop firewalld
systemctl disable firewalld

重启集群:
reboot</

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值