ITPub博客

首页 > Linux操作系统 > Linux操作系统 > linux时间同步

linux时间同步

原创 Linux操作系统 作者:icexiebin 时间:2007-06-28 14:46:31 0 删除 编辑

本文档由ice.xie原创,转载请说明出处
OS: oracle linux

1.linux向windows时间同步
net time -S 192.168.0.84 set

2.linux与linux时间同步
先建立一台NTP服务器,如192.168.0.1
检查所需安装的rpm包
rpm -qa | grep ntp
ntp-4.2.0.a.20040617-4.EL4.1

vi /etc/ntpd.conf
加入此行
restrict 192.168.0.0 mask 255.255.255.0 nomodify notrap

启动服务
service ntpd start

检查ntpd服务状态
pgrep ntpd
netstat -an | grep 123
另一台与这台对时即可(也需安装rpm包),只需运行

[root@test2 etc]# ntpdate 192.168.0.1
28 Jun 11:49:15 ntpdate[3790]: adjust time server 192.168.0.1 offset -0.040774 sec

[@more@]

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/9007136/viewspace-921808/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
  • 博文量
    20
  • 访问量
    326002