本文共 599 字,大约阅读时间需要 1 分钟。
本文 测试环境为 Ubuntu 16.04 amd64
# lsb_release -a
## 允许BIOS与系统时间同步# hwclock -w
# apt-get install ntp
若不需要,直接关闭 防火墙
# ufw disable
# cat /etc/ntp.conf# 系统时间与BIOS事件的偏差记录driftfile /var/lib/ntp/ntp.drift# 权限设置restrict 127.0.0.1restrict ::1# 127.127.1.0 本机回环设备地址server 127.127.1.0
# /etc/init.d/ntp [start | restart]
## 如果看到123端口,说明ntp服务成功启动# netstat -tlunp | grep ntp ## 查看 ntp服务 同步的状态# ntpq -p
# apt-get install ntpdate
# ntpdate {ntp_server_ip}
转载于:https://blog.51cto.com/11495268/2315671