当前位置:   article > 正文

Solaris10配置ntp客户端_solaris10ntp

solaris10ntp

停止、启动NTP服务

svcadm disable svc:/network/ntp

svcadm enable svc:/network/ntp

svcadm refresh svc:/network/ntp

svcadm restart svc:/network/ntp

方法一:

crontab配置:

51 * * * * . /etc/profile;/usr/sbin/ntpdate -b 10.204.50.136 >/tmp/ntp.log

方法二:

# cp /etc/inet/ntp.client /etc/inet/ntp.conf

# vi /etc/inet/ntp.conf

"/etc/inet/ntp.conf" 10 行,291 字符 

# ident "@(#)ntp.client 1.3     00/07/17 SMI"

#

# /etc/inet/ntp.client

#

# An example file that could be copied over to /etc/inet/ntp.conf; it

# provides a configuration for a host that passively waits for a server

# to provide NTP packets on the ntp multicast net.

#

#multicastclient 224.0.1.1

server 10.204.50.135

~

"/etc/inet/ntp.conf" 11 行,313 字符 

# svcs -l svc:/network/ntp:default

fmri         svc:/network/ntp:default

名称         Network Time Protocol (NTP)

启用         否

状态         disabled

next_state   none

state_time   2011年09月25日 星期日 11时59分41秒

重启程序     svc:/system/svc/restarter:default

dependency   require_all/error file://localhost/usr/sbin/ntpq (online) file://localhost/usr/sbin/ntpdate (online)

dependency   require_any/error svc:/network/service (online)

dependency   optional_all/error svc:/milestone/name-services (online)

# /usr/sbin/ntpdate -b 10.204.50.136

26 Sep 09:34:09 ntpdate[24249]: step time server 10.204.50.135 offset -3.715703 sec

# svcadm enable svc:/network/ntp:default

# svcs |grep ntp

online          9:34:21 svc:/network/ntp:default

# ntpq -p

     remote           refid      st t when poll reach   delay   offset    disp

==============================================================================

*10.204.50.135   10.209.11.129    2 u    5   64   37     0.31    5.985  877.17

========================================================

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/花生_TL007/article/detail/591874
推荐阅读
相关标签
  

闽ICP备14008679号