1、rpm包的安装:
rpm -Uvh ntp***.rpm
2、yum安装
# yum install ntpdate -y
1、配置文件位置:
/etc/ntp.conf
2、配置简例:
vi /etc/ntp.conf
(1)、允许任何IP的客户机都可以进行时间同步
将“restrict default nomodify notrap noquery”这行修改成:restrict default nomodify notrap
(2)、只允许某网段的客户机进行时间同步
在restrict default nomodify notrap noquery之后增加:restrict *.*.*.* mask 255.255.255.0 nomodify notrap
service ntpd start
chkconfig ntpd on
检查iptables是否屏蔽了upd 123端口,或者使用如下命令关闭软件防火墙看看是否有效果。
#service iptables stop
联系客服