Press "Enter" to skip to content

FreeBSD12.1中 NTP 时间同步

做测试环境有时候关掉了vm主机,再开启时,时间和当天已经不同步了,所以需要同步,简单的执行一下命令:

/usr/sbin/ntpdate cn.pool.ntp.org

以上命令在其他低版本中也适用,每次执行也有点麻烦,直接放到启动项里,之后开机自动同步时间了,在/etc/rc.conf增加如下配置:

ntpdate_enable="YES" 
ntpdate_program="/usr/sbin/ntpdate"
ntpdate_flags="cn.pool.ntp.org"
发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注