Linux时间同步(把nameNode1作为时间同步服务器)

设置时区

cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

联网情况:ntpdate us.pool.ntp.org

查看NTP状态

service ntpd status

yum install ntpd

chkconfig ntpd on

配置ntp服务端:

vim /etc/ntp.conf

restrict 192.168.0.0 mask 255.255.255.0 nomodify notrap

server 127.127.1.0 # local clock

fudge 127.127.1.0 stratum 10

保存退出

service ntpd restart

客户端:

注掉与Internet通信的Server,使用本地时钟

server 192.168.0.101

在所有子节点上执行命令手动同步时间

ntpdate 192.168.0.101

service ntpd restart

相关文章:

  • 2021-08-21
  • 2021-11-27
  • 2021-08-06
  • 2021-06-23
  • 2021-08-28
  • 2021-09-22
  • 2022-12-23
  • 2021-07-18
猜你喜欢
  • 2021-07-03
  • 2021-12-22
  • 2022-12-23
  • 2022-01-21
  • 2021-05-15
  • 2021-06-25
相关资源
相似解决方案