熱搜關鍵詞: ntp服務器 北斗衛星導航系統 時鐘同步系統廠家 自動駕駛時間同步
安裝NTP服務器
在Linux系統上,配置NTP時間服務器的第一步是安裝NTP軟件包。大多數Linux發行版都提供了NTP的預編譯包,用戶只需通過包管理工具進行安裝。
sudo apt-get update
sudo apt-get install ntp
sudo yum install ntp
/etc/ntp.conf。打開該文件后,你會看到許多配置項,其中最重要的部分是定義時間源(即上層的主時鐘)和控制訪問權限。
# Specify the upstream NTP servers
server 0.pool.ntp.org iburst
server 1.pool.ntp.org iburst
server 2.pool.ntp.org iburst
server 3.pool.ntp.org iburst
# Restrict access to the NTP server
restrict default kod nomodify notrap nopeer noquery
restrict 127.0.0.1
restrict ::1
server指令用于指定上游NTP服務器。iburst選項可在網絡連接時提高同步速度。restrict指令則用于限制哪些主機可以訪問你的NTP服務器,以提高安全性。
sudo ntpdate -u your.ntp.server.ip
sudo ntpq -p
【本文標簽】 時鐘同步系統 NTP服務器 NTP時間同步服務器 對時 同步時鐘
【責任編輯】