是指一种计算机网络仪器,它从参考时钟获取实际时间,再利用计算机网络把时间信息传递给用户。
虽然还有一些比较少用或过时的协定仍然 在使用,但现时最重要及广泛使用,作为时间资讯传送和同步化的协定是网络时间协定(NTP)。时间服务器所参考的时间资讯可以是从另一时间服务器、连线的原子钟或无线电时钟所提供。
步骤如下:
1,时间的设置:
调整日期
date -s 09/21/18 -----2018年9月21日
调整时间
date -s 17:06:50 -----下午17点6分50秒
时间日期一起调整
date 0921170618.50 --------2018年9月21日17时6分50秒
2,时间的手动同步,与微软时间同步:
/usr/sbin/ntpdate time.windows.com
3,时间自动同步:
crontab -e
*/10 * * * * /usr/sbin/ntpdate time.windows.com >> /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
