您当前的位置: 首页 >  服务器

宝哥大数据

暂无认证

  • 3浏览

    0关注

    1029博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

hadoop安装和维护04--NTP服务器,SELinux,防火墙配置

宝哥大数据 发布时间:2016-12-01 16:07:40 ,浏览量:3

1. NTP服务器配置(在所有服务器上执行操作):

比如:江西平台在logs16上配置ntp服务器,其他服务器跟logs16同步 配置方法: Logs16:修改/etc/ntp.conf

server 127.127.1.0 minpoll 4 maxpoll 5
fudge 127.127.1.0 stratum 2
restrict 127.0.0.1
driftfile /var/lib/ntp/drift
################
置空/etc/ntp目录下的ntpservers文件;
修改/etc/ntp目录下的step-tickers文件如下:127.127.1.0
#service ntpd restart     //重启ntp服务
其他logs节点服务器,修改/etc/ntp.conf:
################
server 10.180.91.16 minpoll 4 maxpoll 5
fudge 127.127.1.0 stratum 3
restrict 127.0.0.1
driftfile /var/lib/ntp/drift
logfile /var/log/ntp.log
restrict 10.180.91.16 mask 255.255.255.255
#################
置空/etc/ntp目录下的ntpservers文件;
修改/etc/ntp目录下的step-tickers文件如下:10.180.91.16
其他的服务器上启动ntpd服务,依次执行
#service ntpd start      //其他sever执行同样操作
2. 关闭SELinux(在所有服务器上执行操作)

root权限下执行下面命令:

临时关闭:#setenforce 0
长久关闭:编辑/etc/sysconfig/selinux;修改SELINUX=disabled

SElinux状态查看,启动,关闭: 查看SELinux状态命令:

1、/usr/sbin/sestatus -v      
##如果current mode参数为enabled即为开启状态
current mode:                 enabled
2、getenforce                 ##也可以用这个命令检查

临时关闭(不用重启机器):

setenforce 0 #设置SELinux 成为permissive模式
#setenforce 1 设置SELinux 成为enforcing模式

修改配置文件需要重启机器:

长久关闭:编辑/etc/sysconfig/selinux;修改SELINUX=disabled
重启机器即可
3. 关闭防火墙(在所有服务器上执行操作)

root权限下,执行以下命令:

#chkconfig iptables off
#/etc/init.d/iptables stop

这里写图片描述 其他sever执行同样操作

Linux下查看、关闭及开启防火墙命令 1)永久性生效,重启后不会复原

开启: chkconfig iptables on 
关闭: chkconfig iptables off 

2)即时生效,重启后复原

开启: service iptables start 
关闭: service iptables stop 

3)查看防火墙状态

chkconfig iptables --list
关注
打赏
1587549273
查看更多评论
立即登录/注册

微信扫码登录

0.0389s