32.2. ntpdate

简介:

32.2.1. CentOS 7

# yum install ntpdate
# systemctl enable ntpdate
# systemctl start ntpdate
			
# ntpdate 172.16.3.51
			

或使用

# /usr/libexec/ntpdate-wrapper		
			

32.2.2. CentOS 6

使用 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
	 		
			

另外一个命令rdate同样可以达到ntpdate目的,rdate是系统默认安装。

过程 32.2. ntp client

  1. # yum install ntp
    				
    					
  2. # chkconfig ntpd on
    # service ntpd start				
    					
  3. vim /etc/ntp.conf
    #server 0.centos.pool.ntp.org
    #server 1.centos.pool.ntp.org
    #server 2.centos.pool.ntp.org
    server 192.168.3.5
    					

ntpd 启动后,不能再使用ntpdate




原文出处:Netkiller 系列 手札
本文作者:陈景峯
转载请与作者联系,同时请务必标明文章原始出处和作者信息及本声明。

目录
相关文章
|
开发工具 git Perl
|
Linux 定位技术 Windows
linux时间同步,ntpd、ntpdate
linux时间同步,ntpd、ntpdate 在Windwos中,系统时间的设置很简单,界面操作,通俗易懂。而且设置后,重启,关机都没关系。系统时间会自动保存在Bios的时钟里面,启动计算机的时候,系统会自动在Bios里面取硬件时间,以保证时间的不间断。
3070 0
|
网络安全 运维

热门文章

最新文章