步骤如下:
1,时间的设置:
调整日期
date -s 09/21/18—–9月21日
调整时间
date -s 17:06:50—–下午17点6分50秒
时间日期一起调整
date 0921170618.50 ——–9月21日17时6分50秒
2,时间的手动同步,与微软时间同步:
/usr/sbin/ntpdate
3,时间自动同步:
crontab -e
*/10 * * * * /usr/sbin/ntpdate >> /tmp/crontab.log
4,ntp服务同步,修改/etc/ntp.conf文件,
主服务器设置
server 127.127.1.0
fudge 127.127.1.0 stratum 10
5,ntp服务节点服务器设置:
vi /etc/ntp.conf
disable monitor
server master