在Linux下设置ntp服务

GD Star Rating
loading...

节省时间,什么是ntp在这里就不解释了,下面就大概讲一下在Linux下如何配置、启动ntp服务。当然,前提是在系统中已经安装了ntp服务

首先手动同步一下时间:

  1. # ntpdate  222.73.214.125
# ntpdate  222.73.214.125

其中222.73.214.125是ntp服务器的IP,这里可以找到一堆的ntp服务器,挑一个国内的就行了

同步后使用date命令验证当前时间,如果不对需要配置系统时区。然后修改/etc/ntp.config文件,将刚才选择的ntp服务器添加进去,语法为:

  1. server 222.73.214.125
server 222.73.214.125

最后在系统服务中启动ntp:

  1. # /etc/init.d/ntpd start
  2. # chkconfig --level 35 ntpd on
# /etc/init.d/ntpd start
# chkconfig --level 35 ntpd on

原创内容,转载请注明: 转载自拈花微笑

本文链接地址: 在Linux下设置ntp服务

685

发表评论

电子邮件地址不会被公开。 必填项已用 * 标注

*

您可以使用这些 HTML 标签和属性: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code lang=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" extra="">

:wink: :-| :-x :twisted: :) 8-O :( :roll: :-P :oops: :-o :mrgreen: :lol: :idea: :-D :evil: :cry: 8) :arrow: :-? :?: :!:

使用新浪微博登陆

无觅相关文章插件,快速提升流量