Linux NTP時間伺服器搭建

2022-09-08 22:27:24 字數 924 閱讀 8307

(1)ntp伺服器是用於區域網伺服器時間同步使用的,可以保證區域網所有的伺服器與時間伺服器的時間保持一致,某些應用對時間實時性要求高,必須保證時間的統一性

(2)在網際網路中的時間伺服器也有很多,

例如: 復旦大學免費ntp:"ntp.fudan.edu.cn

阿里雲免費ntp:"ntp1.aliyun.com"

ntp伺服器的監聽埠為udp的123埠,如果防火牆開啟的話就需要在本地防火牆開啟執行客戶端訪問123埠

實驗系統環境

root@rsync[15:33:47]:~#cat /etc/redhat-release centos release 6.9 (final)

在iptables配置檔案中新增如下規則:

vim /etc/sysconfig/iptables -a input -m state --state new -m udp -p udp --dport 123 -j accept

如圖所示

部署服務端ntp服務

第一步:yum安裝ntp

yum install ntp ntpdate -y

第二步:配置ntp.conf配置檔案

#備份源配置檔案 cp /etc/ntp.conf #清空原有檔案中的配置內容 > /etc/ntp.conf #編輯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 server 127.127.1.0 #

Linux NTP時間校準服務搭建

1 實驗環境 系統 centos 7.0 軟體版本 ntp 4.2 2 安裝步驟 a 首先開啟防火牆,放行udp 123 ntp預設埠 埠 firewall cmd permanent add port 123 udp firewall cmd reload b 安裝ntp yum y instal...

搭建時間伺服器

1 請確認是否已經安裝ntp root web002 yum.repos.d rpm qa grep ntp ntpdate 4.2.6p5 28.el7.centos.x86 64 ntp 4.2.6p5 28.el7.centos.x86 64 2 若只有ntpdate而未見ntp,則需刪除原有...

Linux NTP時間同步服務

ntp服務常用來在伺服器集群之間同步時間。一般情況可以如此配置 集群裡選一台伺服器作為主同步節點,配置此伺服器與網際網路上的公共ntp伺服器同步時間 集群裡的其他伺服器同主同步節點同步時間。安裝 yum install ntp修改配置 vim etc ntp.conf主要內容 配置集群網段,允許本網...