配置NTP服务
<section><div class="tasklabel"><h2 class="doc-tairway">操作步骤</h2></div><ol class="ol steps"><li class="li step stepexpand">
<span class="ph cmd"> 远程<a class="xref" href="/ssr/help/compute/ecs/manual.Instance_Manage.Login_Linux_Instance.Linux_Login_webpage" target="_blank" rel="external noopener">连接 Linux实例</a>。</span>
</li><li class="li step stepexpand">
<span class="ph cmd">执行命令sudo vim /etc/ntp.conf用vim打开并编辑NTP服务配置文件。</span>
</li><li class="li step stepexpand">
<span class="ph cmd">找到server ntp 服务器 iburst的信息后,输入i开始编辑文件,给您暂时不需要的NTP服务器句首加上#隐藏起来。</span>
</li><li class="li step stepexpand">
<span class="ph cmd">新添加一行NTP服务器信息,格式为:server 您需要添加的NTP服务器 iburst。平安云提供以下4台ntp服务器。</span>
<div class="itemgroup info">
<p class="p">server ntp1.cloud.papub iburst</p>
<p class="p">server ntp2.cloud.papub iburst</p>
<p class="p">server ntp3.cloud.papub iburst</p>
<p class="p">server ntp4.cloud.papub iburst</p>
</div>
</li><li class="li step stepexpand">
<span class="ph cmd">完成编辑后按下Esc键并输入:wq,保存退出。</span>
</li><li class="li step stepexpand">
<span class="ph cmd">启动ntp服务,根据您的操作系统版本:</span>
<div class="itemgroup info">
<p class="p">Redhat/CentOS 6及之前的操作系统:</p>
<ol class="ol" type="a" id="Configuring_NTP_Service__ol_jyc_jzh_2sb">
<li class="li">执行命令<code class="ph codeph">sudo service ntpd start </code>启用的NTP服务。</li>
<li class="li">执行命令<code class="ph codeph">sudo chkconfig ntpd on </code>配置开机启用NTP服务。</li>
<li class="li">执行命令<code class="ph codeph">ntpstat</code>查看NTP服务状态</li>
</ol>
<p class="p">Redhat/CentOS 7:</p>
<ol class="ol" type="a" id="Configuring_NTP_Service__ol_xty_lzh_2sb">
<li class="li">执行命令<code class="ph codeph">sudo systemctl start ntpd </code>启用的NTP服务。</li>
<li class="li">执行命令<code class="ph codeph">sudo systemctl enable ntpd</code> 配置开机启用NTP服务。</li>
<li class="li">执行命令<code class="ph codeph">ntpstat</code>查看NTP服务状态</li>
</ol>
</div>
</li></ol></section>
提交成功!非常感谢您的反馈,我们会继续努力做到更好!