linux 时间同步两法
来源:互联网 发布:网易有钱 mac版 编辑:程序博客网 时间:2024/05/18 01:27
1. 与一个已知的时间服务器同步
2. 配置网络时间协议(ntp)
2. 配置网络时间协议(ntp)
1. 让linux自动同步时间
vi /etc/crontab
加上一句:
00 0 1 * * root rdate -s time.nist.gov
加上一句:
00 0 1 * * root rdate -s time.nist.gov
time.nist.gov 是一个时间服务器.
2. 时间服务器配置(192.168.10.1)
1). # rpm -ivh ntp-4.1.2-4.EL3.1.i386.rpm
2). # vi /etc/ntp.conf
注释一行
restrict default ignore
加入一行
restrict 192.168.10.0 mask 255.255.255.0 notrust nomodify notrap
3). # vi /etc/ntp/step-tickers
加入一行
pool.ntp.org
这样每次ntpd启动时,会自动连接该国际标准时间服务器;
4). # service ntpd start
5). # netstat -an |grep 123
确保该端口以udp方式开放
1). # rpm -ivh ntp-4.1.2-4.EL3.1.i386.rpm
2). # vi /etc/ntp.conf
注释一行
restrict default ignore
加入一行
restrict 192.168.10.0 mask 255.255.255.0 notrust nomodify notrap
3). # vi /etc/ntp/step-tickers
加入一行
pool.ntp.org
这样每次ntpd启动时,会自动连接该国际标准时间服务器;
4). # service ntpd start
5). # netstat -an |grep 123
确保该端口以udp方式开放
时间客户端配置(192.168.10.2)
1). # ntpdate 192.168.10.2
应该显示同步成功
2). # crond -e
加入
0-59/10 * * * * /usr/sbin/ntpdate 192.168.10.1
表示每隔10分钟同步一次时间
1). # ntpdate 192.168.10.2
应该显示同步成功
2). # crond -e
加入
0-59/10 * * * * /usr/sbin/ntpdate 192.168.10.1
表示每隔10分钟同步一次时间
- linux 时间同步两法
- 两台linux机器时间同步
- linux 两台机器时间同步
- 两台linux机器时间同步
- 两台linux机器时间同步
- 两台linux服务器时间同步
- 两台linux机器时间同步 NTP 配置
- 两台linux机器 系统时间的同步
- 两台linux机器 系统时间的同步
- Linux时间同步(ntpdate+rdate两种方法)
- linux下时间同步的两种方法分享
- linux下时间同步的两种方法分享
- linux时间同步操作
- 【转】Linux 时间同步
- Linux 时间同步 ntpd
- Linux 时间同步配置
- linux时间同步
- Linux时间同步
- Freedom is NOT free :给王同学和从事科研工作的同仁
- 文本分类与文本聚类的区别
- 加入数组成员
- Android硬件抽象层(HAL)概要介绍和学习计划
- Android root权限获取原理详解
- linux 时间同步两法
- 第一个NetBeans应用
- 微博客户端开发的教程,其中验证的部分讲解特别详细
- 南阳OJ 204 Coin Test
- VC中用CPPToolTip轻松实现工具提示
- php simplexml_load_string 解释属性
- 在C#中使用SharpZipLib压缩解压缩zip文件
- vb.net导入excel,生成上级parent_id
- ha软件简介