麻豆国产精品va在线观看不卡I二区三区中文字幕I激情图片区Iadc在线观看I亚洲精品乱码白浆高清久久久久久I中文字幕a∨在线乱码免费看I久久视频一区二区I亚洲综合在线一区二区三区I国产黄色av影视I99久久精品免费视频I日韩色在线观看

您好,歡迎進入北京泰福特電子科技有限公司官網

咨詢服務熱線

400-015-1230

NTP服務在Linux離線安裝及配置說明

發布時間:2022-04-12 10:26:17

常用命令:      

rpm -qa | grep ntp    

#查詢已安裝的ntp版本信息等    

service ntpd status  

#查詢ntp服務狀態    

service ntpd start      

#啟動      

service ntpd stop    

#停止      

service ntpd restart  

#重啟

ntpq -p  

#查看ntp服務器與上層ntp的狀態

ntpstat    

#命令查看時間同步狀態,這個一般需要5-10分鐘后才能成功連接和同步。

所以,服務器啟動后需要稍等下。

剛啟動的時候,一般是:

# ntpstat

unsynchronised

time server re-starting

polling server every 64 s

連接同步后:

synchronised to NTP server (202.120.2.101) at stratum 4

time correct to within 1192 ms

polling server every 64 s

1、下載ntp的安裝包:

ntp:可以為其配置ntp.conf將其設置為自動同步某服務器時鐘。

ntpdate:可以使用 ntpdate -u ip地址 來手動同步某服務器的時鐘。

2、安裝命令:

方式(1) rpm -ivh ntp-4.2.6p5-18.el7.centos.x86_64.rpm

若出現找不到依賴則使用下面的命令:

方式(2)rpm -ivh ntp-4.2.6p5-18.el7.centos.x86_64.rpm --nodeps --force

 本人在使用方式(2)后使用rpm -qa | grep ntp 后看到了ntp,但是沒有在/etc里看到ntp.conf。于是乎又使用方式一重新安裝了一遍,這個文件出現了。

3、客戶端配置:(/etc/ntp.conf)

[root@localhost etc]# cat ntp.conf //然后添加這兩行 ,意思是 允許IPV4 IPV6 查詢 拒絕修改restrict -4 default kod notrap nomodify  

restrict -6 default kod notrap nomodify//允許上層進行修改本機時間

//restrict 10.173.24.27 nomodify notrap noquery//配置上層server(要同步的),在這里配置的是實際的物理地址server 10.173.24.27  fudge 10.173.24.27 stratum 8

[root@localhost etc]# 4、服務器配置:(/etc/ntp.conf)[root@localhost etc]# cat ntp.conf//然后添加這兩行 ,意思是 允許IPV4 IPV6 查詢 拒絕修改restrict -4 default kod notrap nomodify  

restrict -6 default kod notrap nomodify//添加修改上層時間服務器,如果能聯通外網,則不需要修改,

//server 0.rhel.pool.ntp.org iburst

//server 1.rhel.pool.ntp.org iburst

//server 2.rhel.pool.ntp.org iburst

//server 3.rhel.pool.ntp.org iburst

//如果聯不通外網,則把上面幾行注釋,然后添加下面兩行,意思是設置成時間服務器是自己

server 127.127.1.0fudge 127.127.1.0 stratum 8[root@localhost etc]#

5、測試(ntpstat一般是過個5-10分鐘才能同步)

(1)服務器:

[root@localhost etc]# ntpq -p

remote refid  st t when poll reach  delay  offset  jitter

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

*LOCAL(0)    .LOCL.   8 l   36   64  377   0.000   0.000  0.000

[root@localhost etc]# ntpstat synchronised to local net at stratum 9

time correct to within 12 ms polling server every 64 s

(2)客戶端:

[root@localhost etc]# ntpq -p

remote      refid      st t when poll reach   delay   offset  jitter

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

*10.173.24.27    LOCAL(0)         9 u   40   64  377    1.108    2.560   0.764

[root@localhost etc]# ntpstat

synchronised to NTP server (10.173.24.27) at stratum 10

  time correct to within 461 ms

  polling server every 64 s

6、日志設置

[root@localhost sysconfig]# pwd

/etc/sysconfig

[root@localhost sysconfig]#cat ntpd

# Command line options for ntpd

OPTIONS="-g -l /var/log/ntpstats/ntpd.log"

[root@localhost ntpstats]# service ntpd stop

[root@localhost ntpstats]# service ntpd start

[root@localhost ntpstats]# service ntpd status

[root@localhost ntpstats]# tail -200f /var/log/ntpstats/ntpd.log


  • 聯系方式
  • 傳 真:86-10-82782026
  • 電 話:400-015-1230
  • 地 址:北京市海淀區北清路68號院用友軟件園北區17號樓三層
在線咨詢

咨詢電話:

400-015-1230

  • 微信掃碼 關注我們

Copyright ? 2002-2035 北京泰福特電子科技有限公司 版權所有 備案號:京ICP備12028220號
京公網安備 11010802025976號 京公網安備 11010802039126號

掃一掃咨詢微信客服

18519396506
主站蜘蛛池模板: 中文精品一区二区三区四区| 亚洲处破女av日韩精品波波网| 国产乱子伦视频一区二区三区| 国产精品视频永久免费播放| 一二三四日本中文在线| 狼人大香伊蕉国产www亚洲| 亚洲中文字幕无码中文字在线| 国产99在线 | 亚洲| 亚洲精品久久久久69影院| 免费国产拍久久受拍久久| 国产一在线精品一区在线观看| 好男人社区在线www| 久久综合精品成人一本| 中国老熟妇| 欧美亚洲色综久久精品国产| 18禁黄网站男男禁片免费观看| 免费情侣作爱视频| 国产成人亚洲综合无码精品| 日韩人妻无码精品久久免费一| 国产两女互慰高潮视频在线观看| 国产精品高潮呻吟av久久软件| 成人性生交大片免费看中文| 久久中文字幕无码a片不卡古代| 久久午夜福利电影| 亚洲 一区二区 在线| 国产又色又爽又刺激在线播放| 一本色道久久hezyo无码| 国产又色又爽又刺激在线播放| 国产情侣作爱视频免费观看| 亚洲中文字幕va毛片在线| 岛国在线观看无码不卡| 人妻夜夜爽天天爽三区| 成视频年人黄网站免费视频| 日韩av无码一区二区三区不卡毛片| 国产精品久久..4399| 性刺激的大陆三级视频| 后入内射国产一区二区| 国内少妇高潮嗷嗷叫在线播放| 亚洲日韩片无码中文字幕| 亚洲精品网站在线观看你懂的| 玖玖玖国产精品视频|
Powered by RRZCMS