本文共 634 字,大约阅读时间需要 2 分钟。
# yum install ntpdate# systemctl enable ntpdate# systemctl start ntpdate
# ntpdate 172.16.3.51
或使用
# /usr/libexec/ntpdate-wrapper
使用 ntpdate 临时更新时间
[root@dev1 ~]# ntpdate 192.168.3.5 && hwclock -w 9 Aug 12:38:22 ntpdate[2538]: step time server 192.168.3.5 offset 3543.674078 sec
另外一个命令同样可以达到ntpdate目的,rdate是系统默认安装。
过程 32.2. ntp client
# yum install ntp
# chkconfig ntpd on# service ntpd start
vim /etc/ntp.conf#server 0.centos.pool.ntp.org#server 1.centos.pool.ntp.org#server 2.centos.pool.ntp.orgserver 192.168.3.5
ntpd 启动后,不能再使用ntpdate
原文出处:Netkiller 系列 手札
本文作者:陈景峯 转载请与作者联系,同时请务必标明文章原始出处和作者信息及本声明。