Chinaunix首页 | 论坛 | 博客
  • 博客访问: 46040
  • 博文数量: 12
  • 博客积分: 85
  • 博客等级: 民兵
  • 技术积分: 90
  • 用 户 组: 普通用户
  • 注册时间: 2011-03-30 12:07
文章分类
文章存档

2013年(1)

2012年(11)

最近访客

分类:

2012-03-20 09:40:41

原文地址:使用linux配置NTP Server 作者:lnwu

在CENTOS 6.2上面安装配置NTP SERVER

安装NTP:
yum install ntp

配置时间源
vi /etc/ntp.conf
server 210.72.145.44
server ntp.api.bz
server 2.centos.pool.ntp.org

配置对客户端(172.16.0.0/24的网段机器)提供NTP服务
# vi /etc/ntp.conf
restrict 172.16.0。0 mask 255.255.255.0 nomodify notrap


配置NTP Server的层数提供本地服务
server  127.127.1.0     # local clock
fudge   127.127.1.0 stratum 2

设置开机时自动运行时间服务
chkconfig ntpd on

启动或停止时间服务
# service ntpd start
# service ntpd stop
# service ntpd restart

验证ntp服务已经运行
pgrep ntpd

更新本服务器的时间
ntpdate -u 210.72.145.44

配置iptable规则允许客户端访问本机NTP Sever
vi /etc/sysconfig/iptables
增加一行(NTP Server使用UDP 123端口)
-A INPUT -m state --state NEW -m udp -p udp --dport 123 -j ACCEPT

重启iptables
service iptables restart






阅读(571) | 评论(0) | 转发(0) |
0

上一篇:没有了

下一篇:GDB调试技巧:调试复杂的宏定义

给主人留下些什么吧!~~