Solaris10配置ntp客户端

停止、启动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

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

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值