Solaris 10 开启NTP服务

服务器为Solaris平台,上面跑着ERP (2RAC node+4AP node),因某台AP时间比其他服务器快8分钟,导致ERP中“运行停靠站-SRS”等请求报错,处理思路:

选一台DB作为NTP服务器,其余的服务器向他同步

1.  Server,名称为COMPARDRAC1:
cd /etc/inet/
cp ntf.server ntf.conf
vi ntf.conf

server 127.127.1.0
fudge 127.127.1.0 stratum 0

#broadcast 224.0.1.1 ttl 4

enable auth monitor
driftfile /var/ntp/ntp.drift
statsdir /var/ntp/ntpstats/
filegen peerstats file peerstats type day enable
filegen loopstats file loopstats type day enable
filegen clockstats file clockstats type day enable

keys /etc/inet/ntp.keys
trustedkey 0
requestkey 0
controlkey 0

touch /var/ntp/ntp.drift
cd /usr/lib/inet
svcadm enable svc:/network/ntp

等待5分钟左右,确认指令:
ntpq  -p
     remote           refid      st t when poll reach   delay   offset    disp
==============================================================================
*LOCAL(0)        .LCL.            0 l   31   64    1     0.00    0.000 15885.0

2.  Client
cp /etc/inet/ntp.client /etc/inet/ntp.conf
vi /etc/inet/ntp.conf

server COMPARDNTPS0 prefer

touch /var/ntp/ntp.drift
svcadm enable svc:/network/ntp

等待5分钟左右,确认
ntpq  -p

remote         refid          st t when poll  reach  delay  offset  disp
====================================================
*COMPARDRAC0   .LCL.         1 u  591 1024  377  0.66    0.086    0.14


3.  停止、启动NTP服务
svcadm disable svc:/network/ntp
svcadm enable svc:/network/ntp
svcadm refresh svc:/network/ntp
svcadm restart svc:/network/ntp

4.  查看服务
ps -ef|grep ntp
ntpq  -p

  • 1
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值