linux 时钟同步
2014-05-25 11:03
411 查看
查看ntp服务是否安装
[root@racdb03 ~]# rpm -qa|grep ntp
chkfontpath-1.10.1-1.1
ntp-4.2.2p1-9.el5_3.2
修改/etc/ntp.conf
vi /etc/ntp.conf
增加以下内容
restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap
server 203.117.180.36
注释:允许192.168.1.0网段的所有设备使用NTP服务器进行时钟同步;203.117.180.36为NTP服务器IP地址
启动NTP服务
[root@racdb03 ~]# service ntpd start
启动 ntpd: [确定]
开机自动启动
[root@racdb03 ~]# chkconfig ntpd on
检查同步情况
[root@racdb03 ~]# ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
203.117.180.36 .ACTS. 1 u 117 256 337 130.850 15573.9 1334.29
*LOCAL(0) .LOCL. 10 l 51 64 377 0.000 0.000 0.001
[root@racdb03 ~]# ntpstat
synchronised to local net at stratum 11
time correct to within 11 ms
polling server every 512 s
ntp客户端配置
[root@racdb04 ~]# crontab -l
0 0 * * 6 /usr/sbin/ntpdate 192.168.1.108
注释:每周六0点进行时钟同步; /usr/sbin/ntpdate为绝对路径,否则可能要报错
在ntp客户端上不用启动ntpd服务
[root@racdb03 ~]# rpm -qa|grep ntp
chkfontpath-1.10.1-1.1
ntp-4.2.2p1-9.el5_3.2
修改/etc/ntp.conf
vi /etc/ntp.conf
增加以下内容
restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap
server 203.117.180.36
注释:允许192.168.1.0网段的所有设备使用NTP服务器进行时钟同步;203.117.180.36为NTP服务器IP地址
启动NTP服务
[root@racdb03 ~]# service ntpd start
启动 ntpd: [确定]
开机自动启动
[root@racdb03 ~]# chkconfig ntpd on
检查同步情况
[root@racdb03 ~]# ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
203.117.180.36 .ACTS. 1 u 117 256 337 130.850 15573.9 1334.29
*LOCAL(0) .LOCL. 10 l 51 64 377 0.000 0.000 0.001
[root@racdb03 ~]# ntpstat
synchronised to local net at stratum 11
time correct to within 11 ms
polling server every 512 s
ntp客户端配置
[root@racdb04 ~]# crontab -l
0 0 * * 6 /usr/sbin/ntpdate 192.168.1.108
注释:每周六0点进行时钟同步; /usr/sbin/ntpdate为绝对路径,否则可能要报错
在ntp客户端上不用启动ntpd服务
相关文章推荐
- Linux(Unix)时钟同步ntpd服务配置方法(转载)
- Linux下时钟同步
- Linux 集群时钟同步
- linux时钟同步
- linux 时钟同步
- Linux(Unix)时钟同步ntpd服务配置方法
- linux系统时间同步,硬件时钟和系统时间同步,时区的设置
- SUSE linux 系统管理之时钟同步
- 嵌入式linux C语言 如何同步系统时钟到硬件时钟
- Linux下时钟时区以及时间同步的命令和配置
- Linux(Unix)时钟同步ntpd服务配置方法
- linux 时钟同步
- Linux(Unix)时钟同步ntpd服务配置方法
- Linux 时钟同步
- Linux下时钟时区以及时间同步的命令和配置
- linux 时钟同步
- Linux(Unix)时钟同步ntpd服务配置方法
- Linux 硬件时钟系统与系统时间的同步
- Linux 使用 NTP 时钟同步