Hadoop平台三台虚拟机完成防火墙、SElinux和时间同步等系统设置

1、防火墙设置。

集群化软件之间需要通过端口互相通讯,为了避免出现网络不通的问题,我们可以简单的在集群内部关闭防火墙。每台机器都要执行。

 systemctl stop firewalld
systemctl disable firewalld

在这里插入图片描述

2、SELinux修改。

Linux有一个安全模块:SELinux,用以限制用户和程序的相关权限,来确保系统的安全稳定。
在当前,我们只需要关闭SELinux功能,避免导致后面的软件运行出现问题即可。
每台机器都要执行。

vim /etc/sysconfig/selinux 

在这里插入图片描述
将“SELINUX=enforcing”改为“SELINUX=disabled”,保存退出,单词别写错,不然可能无法重启系统。

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of three values:
#     targeted - Targeted processes are protected,
#     minimum - Modification of targeted policy. Only selected processes are protected. 
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted

在这里插入图片描述

3、时间同步。
3.1 安装ntp软件;

 yum install -y ntp

在这里插入图片描述
在这里插入图片描述
3.2 删除原时间信息;

 rm -f /etc/localtime

在这里插入图片描述
3.3 配置为上海时区;

ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

在这里插入图片描述
3.4 同步时间

ntpdate -u ntp.aliyun.com

在这里插入图片描述
3.5 开启ntp服务并设置开机自启

systemctl start ntpd
systemctl enable ntpd

在这里插入图片描述

  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Z_凌云

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值