ntpd时间同步 安装与配置
来源:互联网 发布:三工序雕刻机怎么编程 编辑:程序博客网 时间:2024/06/07 10:36
1,安装
yum -y install ntp
vim /etc/ntp.conf
默认配置:
driftfile /var/lib/ntp/drift
restrict default kod nomodify notrap nopeer noquery
restrict -6 default kod nomodify notrap nopeer noquery
restrict 127.0.0.1
restrict -6 ::1
server 0.centos.pool.ntp.org iburst
server 1.centos.pool.ntp.org iburst
server 2.centos.pool.ntp.org iburst
server 3.centos.pool.ntp.org iburst
includefile /etc/ntp/crypto/pw
keys /etc/ntp/keys
修改:
允许任何IP的客户机都可以进行时间同步
将“restrict default kod nomodify notrap nopeer noquery”这行修改成:
restrict default nomodify
启动前先关闭防火墙
service ntpd start
客服端测试
ntpdate 192.168.1.101
最好客户端安装ntpd,指定时间server为上面配置的服务器地址,推荐
server 192.168.1.101
ntpd是步进式的逐渐调整时间,测试时如果你的ntpd服务器时间是准的,客户端不一定要ntpd服务启动时就自动对准,但过一段时间,就同步了。
TODO
加上防火墙后测试:
0 0
- ntpd时间同步 安装与配置
- NTPD安装与配置
- Linux 时间同步 ntpd
- ntpd 时间同步
- ntpd ntpdate时间同步
- freebsd ntpd 时间同步
- 时间同步,ntpd、ntpdate
- linux ntpdate客户端与ntpd服务器端设置时间同步
- 用ntpd做时间同步
- linux 时间同步、ntpd、ntpdate
- linux时间同步,ntpd、ntpdate
- linux时间同步,ntpd、ntpdate
- linux时间同步,ntpd、ntpdate
- linux时间同步,ntpd、ntpdate
- linux时间同步,ntpd、ntpdate
- linux时间同步,ntpd、ntpdate
- linux时间同步,ntpd、ntpdate
- linux时间同步,ntpd、ntpdate
- jquery中 html() text() val() innerText总结
- Cocos2dx Shader学习
- springMVC拦截器
- Rtsp发送ANNOUNCE到Darwin时,RTSP/1.0 401 Unauthorized
- 原型模式
- ntpd时间同步 安装与配置
- java质数判断/质数因子/所有质数(素数)*
- LInux系统入门学习了解
- 如何用笔记本开wifi。
- Android之widget
- MediaRecorder录制音频及代码的抽取封装
- CSS实现点击事件样式
- NEFU 84 扩展欧几里得
- [又值奥运季] 2016年里约奥运会--8月19日赛事