搭建集群后,总因为时间不一样,导致各种问题。
- 设定时区
dpkg-reconfigure tzdata
- 选择Asia -> 再选择Shanghai -> OK
- 安装ntpdate工具
apt-get install ntpdate
- 将系统时间与网络同步
ntpdate cn.pool.ntp.org
- 将时间写入硬件
hwclock --systohc
- 查看时间是否已同步
date
搭建集群后,总因为时间不一样,导致各种问题。
dpkg-reconfigure tzdata
apt-get install ntpdate
ntpdate cn.pool.ntp.org
hwclock --systohc
date