亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

  免費注冊 查看新帖 |

Chinaunix

  平臺 論壇 博客 文庫
最近訪問板塊 發(fā)新帖
查看: 1228 | 回復: 0
打印 上一主題 下一主題

在solaris9上安裝時間服務器 [復制鏈接]

論壇徽章:
0
跳轉(zhuǎn)到指定樓層
1 [收藏(0)] [報告]
發(fā)表于 2006-04-04 15:56 |只看該作者 |倒序瀏覽
在solaris9上安裝時間服務器

參考
http://www.ddvip.net/OS/solaris/index3/79.htm

http://www.pool.ntp.org/
http://www.pool.ntp.org/zone/asia
亞洲地區(qū), 將下面幾行加入ntp.conf文件中。
   server 0.asia.pool.ntp.org
   server 1.asia.pool.ntp.org
   server 2.asia.pool.ntp.org
由于工作需要把內(nèi)網(wǎng)的機器時間都統(tǒng)一。于是自己搭建一個time server。
利用192.168.1.76(sky76)這臺solaris9機器作為server端,客戶端有win2k,winxp和solairs等。
默認情況下,solaris9已經(jīng)裝好了xntpd(軟件包名為SUNWntpu)
# which ntpdate
/usr/sbin/ntpdate
# which ntpq
/usr/sbin/ntpq
而且已經(jīng)有以下腳本
/etc/init.d/xntpd
啟動xntpd:# /etc/init.d/xntpd start
停止xntpd: # /etc/init.d/xntpd stop
在開機啟動腳本里有 /etc/rc2.d/S74xntpd
相關(guān)配置文件
/etc/inet/ntp.server
/etc/inet/ntp.client
/var/ntp 目錄
1、服務器端的設置(ntp.conf)
ntp.conf這個文件默認安裝完是沒有的,可以復制一份
(可查看/etc/init.d/xntpd 腳本文件)
# cp /etc/inet/ntp.server /etc/inet/ntp.conf
# touch /var/ntp/ntp.drift
# vi /etc/inet/ntp.conf   編輯配置文件
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#/etc/ntp.conf
# @(#)ntp.server 1.5 99/09/21 SMI
#
# /etc/inet/ntp.server
#
# An example file that could be copied over to /etc/inet/ntp.conf and
# edited; it provides a configuration template for a server that
# listens to an external hardware clock, synchronizes the local clock,
# and announces itself on the NTP multicast net.
#
#
# * All TrueTime receivers are now supported by one driver, type 5.
# Types 15 and 25 will be retained only for a limited time and may
# be reassigned in future.
#
# Either a peer or server. Replace "XType" with a value from the
# table above.
#server 127.127.XType.0 prefer
# 定義了兩個可用的服務器 在這里也可以直接用域名來代替IP
#setserver ntp.cuhk.edu.hk //這個是internet上的頂級time server
server ntp.cuhk.edu.hk
#setserver ntp.fudan.edu.cn //這個是復旦大學的
server ntp.fudan.edu.cn
# 或者使用
http://www.pool.ntp.org/zone/asia
亞洲區(qū)的服務器
#server 0.asia.pool.ntp.org
#server 1.asia.pool.ntp.org
#server 2.asia.pool.ntp.org
#fudge 127.127.XType.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
#關(guān)于認證的選項,因為在局域網(wǎng)中用,不做任何的驗證。注釋掉即可
#keys /etc/inet/ntp.keys
#trustedkey 0
#requestkey 0
#controlkey 0
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2、啟動ntpd服務
當配置文件修改完畢后,利用腳本啟動ntpd服務
# /etc/init.d/xntpd start
檢查是否啟動
# ps -ef | grep ntp
root  4258     1  0 14:58:07 ?        0:00 /usr/lib/inet/xntpd
上述表示已經(jīng)啟動。
3、一些命令的用途
# man ntpdate
# ntpdate ntp.fudan.edu.cn 可以和復旦時間服務器同步時間。
# man ntpq 標準網(wǎng)絡時間協(xié)議(ntp)查詢程序。
# ntpq
> as
> pe
4、客戶端機器的設置
對于winxp和win2003
打開“日期和時間”屬性面板,在Internet時間頁中填入時間的服務器(192.168.1.76)就行了
對于solaris機器
可以用ntp的client程序更新,
# ntpdate 192.168.1.76
或者寫入root用戶的cron里自動每天執(zhí)行
# export EDITOR=vi
# crontab -e
#synchronization time from 192.168.1.76
05 0 * * * /usr/sbin/ntpdate 192.168.1.76 >> /var/ntp/ntp_client_err.log 2>&1
注意:當ntpd服務器啟動以后,client不能馬上更新時間,要等一會才能用。
還有一點就是client上的時間和server相差很小的時候(比如只有1分,半分的)執(zhí)行了命令也不會和服務器同步的,ntp是逐步一點一點的來同步時間的,如果想立刻和服務器同步就把client時間改前或改后10分鐘,再同步就可以了


本文來自ChinaUnix博客,如果查看原文請點:http://blog.chinaunix.net/u/7635/showart_95112.html
您需要登錄后才可以回帖 登錄 | 注冊

本版積分規(guī)則 發(fā)表回復

  

北京盛拓優(yōu)訊信息技術(shù)有限公司. 版權(quán)所有 京ICP備16024965號-6 北京市公安局海淀分局網(wǎng)監(jiān)中心備案編號:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年舉報專區(qū)
中國互聯(lián)網(wǎng)協(xié)會會員  聯(lián)系我們:huangweiwei@itpub.net
感謝所有關(guān)心和支持過ChinaUnix的朋友們 轉(zhuǎn)載本站內(nèi)容請注明原作者名及出處

清除 Cookies - ChinaUnix - Archiver - WAP - TOP