linux下配置ntp时间同步服务

来源:岁月联盟 编辑:exp 时间:2012-01-07
修改/etc/ntp.conf文件相应内容:
增加一行:server asia.pool.ntp.org prefer
注释掉这一行:server 127.127.1.0
启动ntp服务:service ntpd start
修改/etc/sysconfig/ntpd文件,SYNC_HWCLOCK=no 改为SYNC_HWCLOCK=yes,这样BIOS时间也会更新。
设置iptable,时间服务使用的端口是udp 123端口。