NTP--将本主机设置为NTP时钟源,供本机或其他主机使用
2014-11-24 11:34
197 查看
1. 修改/etc/ntp.conf文件,将默认的限制注释掉
#restrict default kod nomodify notrap nopeer noquery
#restrict -6 default kod nomodify notrap nopeer noquery
允许客户端同步时间
restrict 127.0.0.1
restrict -6 ::1
restrict 10.6.23.0 mask 255.255.255.0 nomodify
2. 将本机作为时钟源
server 127.127.1.0
fudge 127.127.1.0 stratum 10
127.127.1.0 代表本主机
3. 完了重启ntp服务,执行命令 ntpq -p
看到LOCAL的一行,就是已经把自己配成自己的时钟源,当然也可以做为别人的时钟源。
要等待几分钟,待前面加上*或+号后 就是已经同步成功了
4. 服务器和客户端防火墙放开
iptables -I INPUT -p udp --sport 123 -j ACCEPT
iptables -I OUTPUT -p udp --dport 123 -j ACCEPT
service iptables save
#restrict default kod nomodify notrap nopeer noquery
#restrict -6 default kod nomodify notrap nopeer noquery
允许客户端同步时间
restrict 127.0.0.1
restrict -6 ::1
restrict 10.6.23.0 mask 255.255.255.0 nomodify
2. 将本机作为时钟源
server 127.127.1.0
fudge 127.127.1.0 stratum 10
127.127.1.0 代表本主机
3. 完了重启ntp服务,执行命令 ntpq -p
看到LOCAL的一行,就是已经把自己配成自己的时钟源,当然也可以做为别人的时钟源。
要等待几分钟,待前面加上*或+号后 就是已经同步成功了
4. 服务器和客户端防火墙放开
iptables -I INPUT -p udp --sport 123 -j ACCEPT
iptables -I OUTPUT -p udp --dport 123 -j ACCEPT
service iptables save
相关文章推荐
- 使用Web标准建站第5天:head区的其他设置
- 使用Web标准建站第5天:head区的其他设置
- VMware下linux Ubuntu10.04使用NAT共享主机IP上网方式的设置参考
- 设置VMWARE通过桥接方式使用主机无线网卡上网
- Apache 设置多个虚拟主机使用一个 IP 地址
- 使用webshell突破虚拟主机权限设置的一般思路
- 如何保留自己对eclipse的个性化设置,在其他工程中使用
- windows 2003 如何利用远程桌面来设置主机密码,或是直接使用主机声卡
- Windows下Apache使用虚拟主机(多域名多站点)的设置
- 设置VMWARE通过桥接方式使用主机无线网卡上网
- 在配置使用Membership或其他的Providers的ASP.NET2.0时一定要设置applicationName属性
- 关于Windows下Apache使用虚拟主机(多域名多站点)的设置
- 使用Web标准建站:head区的其他设置
- GTK如何给Label和其他的widget设置字体?不是使用API函数哦
- 多域名指向相同的虚拟主机如何设置使用不同的首页
- 在配置使用Membership或其他的Providers的ASP.NET2.0时一定要设置applicationName属性
- 当局域网内某台主机使用P2P进行下载时,P2P软件会占用局域网到互联网出口的大量的带宽,导致其他用户网速慢、卡等现象。BT等软件在下载的同时又作为种子为其他人提供下载服务
- 【转】在配置使用Membership或其他的Providers的ASP.NET2.0时一定要设置applicationName属性。
- 关于在虚拟机上使用mysql其他主机不能访问的解决办法
- Windows8系统输入法个性设置安装和使用其他输入法