Linux 服务器时间修改设置

  • 服务器
  • 2022-05-23
  • 679 已阅读
  • 作者: 本网整理
  • 来源: CSDN
简介Linux 服务器时间修改设置

步骤如下:

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

很赞哦! ( 0 )