小雪尝禁果又粗又大的视频,人妻中文乱码在线网站,江苏少妇性BBB搡BBB爽爽爽,AV片在线观看免费

行業(yè)資訊

  • 首頁
  • 新聞中心
  • 行業(yè)資訊

ntp服務(wù)器如何進(jìn)行配置和部署呢?


2020年11月09日

互聯(lián)網(wǎng)時代,不同類型服務(wù)器作用有所差異,其中NTP服務(wù)器是用來使計算機時間同步化的一種協(xié)議,它可以使計算機對其服務(wù)器或時鐘源做同步化,它可以提供高精準(zhǔn)度的時間校正,且可介由加密確認(rèn)的方式來防止惡毒的協(xié)議攻擊,那么ntp服務(wù)器要怎么去配置和部署呢?

 

ntp服務(wù)器如何進(jìn)行配置和部署呢?

 

一.NTP介紹

NTP(Network Time Protocol,網(wǎng)絡(luò)時間協(xié)議)是用來使網(wǎng)絡(luò)中的各個計算機時間同步的一種協(xié)議。它的用途是把計算機的時鐘同步到世界協(xié)調(diào)時UTC,其精度在局域網(wǎng)內(nèi)可達(dá)0.1ms,在互聯(lián)網(wǎng)上絕大多數(shù)的地方其精度可以達(dá)到1-50ms,NTP服務(wù)器就是利用NTP協(xié)議提供時間同步服務(wù)的。

 

二.NTP服務(wù)器安裝

1.查看本機系統(tǒng)版本

cat /etc/redhat-release 

2.查看本機NTP軟件包

rpm -qa ntp

 

三.NTP服務(wù)器配置

1.備份ntp服務(wù)器配置文件

cp /etc/ntp.conf /etc/ntp.conf.bak

ll /etc/ntp.conf*

2.精簡優(yōu)化配置文件

egrep -v "^$|#" /etc/ntp.conf.bak >/etc/ntp.conf

3.編輯配置文件

vim /etc/ntp.conf

 

配置文件文本:

driftfile /var/lib/ntp/drift

restrict default kod nomodify notrap nopeer noquery

restrict -6 default kod nomodify notrap nopeer noquery

restrict 127.0.0.1 

restrict -6 ::1

 

允許內(nèi)網(wǎng)其他機器同步時間

restrict 172.16.1.0 mask 255.255.255.0 nomodify notr

#server 0.centos.pool.ntp.org iburst

#server 1.centos.pool.ntp.org iburst

#server 2.centos.pool.ntp.org iburst

#server 3.centos.pool.ntp.org iburst

 

定義使用的上游 ntp服務(wù)器,將原來的注釋

server ntp1.aliyun.com

server time1.aliyun.com

 

允許上層時間服務(wù)器主動修改本機時間

restrict time1.aliyun.com nomodify notrap noquery

restrict ntp1.aliyun.com nomodify notrap noquery

 

外部時間服務(wù)器不可用時,以本地時間作為時間服務(wù)

server 127.127.1.0 

fudge 127.127.1.0 stratum 10

includefile /etc/ntp/crypto/pw

keys /etc/ntp/keys

 

四.啟動NTP服務(wù)器

Centos6: /etc/init.d/ntpd start centos7: systemctl start ntpd

ntpq -p 顯示節(jié)點列表

 

五.客戶端時間同步測試

ntpdate 10.0.0.111(ntp服務(wù)器)

 

租用服務(wù)器bjsuncity.com宇眾網(wǎng)絡(luò)


客服