時間伺服器

2021-09-20 16:58:06 字數 991 閱讀 2887

方法1:

與乙個已知的時間伺服器同步

ntpdate time.nist.gov

其中 time.nist.gov 是乙個時間伺服器.

刪除本地時間並設定時區為上海

rm -rf /etc/localtime

ln -s /usr/share/zoneinfo/asia/shanghai /etc/localtime

方法2:

linux

自動同步時間

vi /etc/crontab

加上一句:

00 0 1 * * root rdate -s time.nist.gov

配置時間伺服器配置(192.168.10.1)

1)、# rpm -ivh ntp-4.1.2-4.el3.1.i386.rpm

2)、# vi /etc/ntp.conf

注釋一行:

restrict default ignore

加入一行:

restrict 192.168.10.0 mask 255.255.255.0 notrust nomodifynotrap

3)、# vi /etc/ntp/step-tickers

加入一行:

pool.ntp.org

這樣每次ntpd啟動時,會自動連線該國際標準時間伺服器;

4)、# service ntpd start

5)、# netstat -an |grep 123

確保該埠以udp方式開放

時間客戶端配置(192.168.10.2)

1)、# ntpdate 192.168.10.2

應該顯示同步成功

2)、# crond -e加入

0-59/10 * * * * /usr/sbin/ntpdate 192.168.10.1

每隔10分鐘同步一次時間

時間伺服器

ntp.sjtu.edu.cn 202.120.2.101 上海交通大學網路中心ntp伺服器位址 s1a.time.edu.cn 北京郵電大學 s1b.time.edu.cn 清華大學 s1c.time.edu.cn 北京大學 s1d.time.edu.cn 東南大學 s1e.time.edu.cn...

關於時間伺服器

在配置 rac 過程用到。os linux 2.6.9 42.elsmp 1 smp sat aug 12 09 39 11 cdt 2006 i686 i686 i386 gnu linux 節點1上的配置 more etc ntp.conf restrict default ignore res...

伺服器時間同步

1.讓伺服器的時間同步,尋找乙個網路時間伺服器,比如一些國家的授時中心 微軟公司授時主機 美國 time.windows.com 台警大授時中心 台灣 asia.pool.ntp.org 新加坡授時中心 203.117.180.36 2.我們的電腦怎樣去同步授時中心的時間 ntpdate asia....