网友的力量无穷尽,iridium77 给我们提供http途径来同步时间,这是任何VPS都无法屏蔽的,哈哈😄
Installation from source: Tested on Linux and FreeBSD only, but should work for most Unix flavors.
$ tar zxvf htpdate-x.y.z.tar.gz or $ tar jxvf htpdate-x.y.z.tar.bz2 $ cd htpdate-X.Y.Z $ make $ make install An example init script (scripts/htpdate.init) for use in /etc/init.d/ is included, but not installed automatically. This scripts with run htpdate as a daemon. Another option is to use htpdate in a cronjob and start it periodically from cron. For a daily time sync it would look something like this: 5 3 * * * /usr/bin/htpdate -s www.linux.org www.freebsd.org Installation from RPM: The easiest way to install (Redhat, SuSE, Mandriva etc..)
$ wget https://rpmfind.net/linux/dag/redhat/el7/en/x86_64/dag/RPMS/htpdate-1.1.0-1.el7.rf.x86_64.rpmor$ wget https://rpmfind.net/linux/dag/redhat/el6/en/i386/dag/RPMS/htpdate-1.1.0-1.el6.rf.i686.rpm$ rpm -Uvh htpdate-x.y.z.i386.rpm
注意:rmp 的版本
Installation from deb: The easiest way to install (Debian,Ubuntu etc..)
$ apt install htpdate
htpdate 的配置文件:nano /etc/default/htpdate
HTP_SERVERS="www.pool.ntp.org www.ntp.br www.wikipedia.org"
如果在大陆,最好改为 cn.pool.ntp.org