linux中設置ntp時間同步

NTP全稱爲Network Time Protocol,即網絡時間協議。是用來使計算機時間同步的一種協議。它可使計算機對服務器或時鐘源作同步,能夠提供高精度的時間校訂(LAN 上與標準時間小於1毫秒,WAN上幾十毫秒),並且能夠由加密確認的方式防止惡意的協議***。linux

實驗環境
兩臺虛擬機 NTP時間服務器 192.168.43.57
主機 192.168.43.29vim

服務端服務器

安裝ntp 網絡

yum install -y ntp ide

編輯配置文件 vim /etc/ntp.conf加密

linux中設置ntp時間同步

將這行給註釋
#restrict default nomodify notrap nopeer noquery rest

linux中設置ntp時間同步

開啓ntp服務: systemctl start ntpdblog

客戶端同步

安裝ntp服務: yum -y install ntp虛擬機

修改配置文件,添加上層時間服務器

linux中設置ntp時間同步

開啓ntp服務:service ntpd start

同步時間: ntpdate 192.168.43.57

相關文章
相關標籤/搜索