ubuntu vps同步网络时间的方法
2012-08-23 18:16
357 查看
最近发现购买的linux vps运行一段时间以后就会发生时间不准的情况。
可以利用ntp服务与网络时间进行同步,下面的方法适用于ubuntu系统。
方法:
网上同步时间
1. 安装ntpdate工具
2. 设置系统时间与网络时间同步
3. 将系统时间写入硬件时间
注明:cn.pool.ntp.org是位于中国的公共NTP服务器,用此时间来同步本机的系统时间。
因为系统架构的原因,部分linux vps默认是不允许在客户在vps自行自行同步网络时间,当执行同步时间的操作时,会出现下列错误:
# ntpdate cn.pool.ntp.org
20 Aug 23:47:44 ntpdate[17991]: sendto(202.118.1.199): Operation not permitted
20 Aug 23:47:44 ntpdate[17991]: sendto(114.80.81.13): Operation not permitted
20 Aug 23:47:52 ntpdate[17991]: no server suitable for synchronization found
注:本文首发于度外网络官方博客:http://www.duwaiweb.com/blog/20120821_d584addf-bc39-43f8-bf21-d265fc638285.html
可以利用ntp服务与网络时间进行同步,下面的方法适用于ubuntu系统。
方法:
网上同步时间
1. 安装ntpdate工具
# sudo apt-get install ntpdate
2. 设置系统时间与网络时间同步
# ntpdate cn.pool.ntp.org
3. 将系统时间写入硬件时间
# hwclock –systohc
注明:cn.pool.ntp.org是位于中国的公共NTP服务器,用此时间来同步本机的系统时间。
因为系统架构的原因,部分linux vps默认是不允许在客户在vps自行自行同步网络时间,当执行同步时间的操作时,会出现下列错误:
# ntpdate cn.pool.ntp.org
20 Aug 23:47:44 ntpdate[17991]: sendto(202.118.1.199): Operation not permitted
20 Aug 23:47:44 ntpdate[17991]: sendto(114.80.81.13): Operation not permitted
20 Aug 23:47:52 ntpdate[17991]: no server suitable for synchronization found
注:本文首发于度外网络官方博客:http://www.duwaiweb.com/blog/20120821_d584addf-bc39-43f8-bf21-d265fc638285.html
相关文章推荐
- ubuntu vps同步网络时间的方法
- Ubuntu设置系统时间与网络时间同步
- windows10和ubuntu16.04双系统下时间不同步解决方法
- ubuntu设置系统时间与网络时间同步
- ubuntu设置系统时间与网络时间同步
- C#实现从网络同步标准北京时间的方法
- ubuntu在新建面板上显示输入法状态,网络状况,音量大小,时间等信息的方法
- Ubuntu设置系统时间与网络时间同步
- C#同步网络时间的方法实例详解
- ubuntu设置系统时间与网络时间同步
- win7 和 ubuntu16.04 双系统时间同步设置方法
- Ubuntu 系统同步网络时间
- ubuntu修改时间、显示硬件时间、同步系统时钟(date命令使用方法)
- ubuntu设置系统时间与网络时间同步
- Ubuntu 16.04 LTS与windows双系统时间同步解决方法
- 网络时间同步技术(网络同步时钟)厂家叫你配置方法
- ubuntu设置系统时间与网络时间同步
- 如何解决win10与Ubuntu16.04时间不同步的问题的方法
- VPS的CentOS中时间同步方法
- ubuntu 同步网络时间