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

行業(yè)資訊

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


2020年11月09日

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

 

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

 

一.NTP介紹

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

 

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

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

cat /etc/redhat-release 

2.查看本機(jī)NTP軟件包

rpm -qa ntp

 

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

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

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

ll /etc/ntp.conf*

2.精簡(jiǎn)優(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)其他機(jī)器同步時(shí)間

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ù)器,將原來(lái)的注釋

server ntp1.aliyun.com

server time1.aliyun.com

 

允許上層時(shí)間服務(wù)器主動(dòng)修改本機(jī)時(shí)間

restrict time1.aliyun.com nomodify notrap noquery

restrict ntp1.aliyun.com nomodify notrap noquery

 

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

server 127.127.1.0 

fudge 127.127.1.0 stratum 10

includefile /etc/ntp/crypto/pw

keys /etc/ntp/keys

 

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

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

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

 

五.客戶(hù)端時(shí)間同步測(cè)試

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

 

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


客服