NTP centOS6.5

server:

编辑文件/etc/ntp.conf

添加如下

  server IP prefer  #主服务器

  peer IP               #备服务器

保存退出

启停:

  #/etc/init.d/ntpd start

系统自动启动

  #chkconfig --list|grep ntp

  #chkconfig --level 5 ntpd on

关于文件/etc/ntp.conf中的权限控制命令restrict

  restrict IP mask netmask_IP parameter
  其中 IP 可以是软件地址,也可以是 default ,default 就类似 0.0.0.0
  至于 paramter 则有:
  ignore:关闭所有的 NTP 联机服务,如果加此参数,ntp服务即使开启也不会生效
  nomodify:表示 Client 端不能更改 Server 端的时间参数,Client 端仍然可以透过 Server 端来进行网络校时。
  notrust :该 Client 除非通过认证,否则该 Client 来源将被视为不信任网域
  noquery :不提供 Client 端的时间查询
  notrap :不提供trap这个远程事件登入

client:

  #ntpdate IP

FAQ:

问题1.ntpdate[18977]: the NTP socket is in use, exiting

原因:NTP已启动,正在运行

#service ntpd stop

#/etc/int.d/ntpd stop

猜你喜欢

转载自www.cnblogs.com/leisurelyRD/p/9241442.html
NTP
今日推荐