校对集群服务器时间

做分布式如果服务器的时间不同步会造成意想不到的问题,再进行之前最好校对服务器时间。

校对

输入 date 命令可以查看当前服务器时间

安装ntp工具进行时间校对

1
$ sudo yum install ntp

校对时间之前注意先关闭防火墙

1
2
3
$ service iptables stop # 关闭防火墙
$ ntpdate cn.pool.ntp.org # 同步时间
$ service iptables start # 开启防火墙

校对集群服务器时间
http://example.com/2018/10/12/2018-10-12-校对集群服务器时间/
Author
Hoey
Posted on
October 12, 2018
Licensed under