美文网首页
ntp时间同步配置

ntp时间同步配置

作者: JaySon_h | 来源:发表于2019-03-10 20:33 被阅读0次

安装 ntp

yum install ntp -y
systemctl stop ntpd  # 先停止ntpd服务
/usr/sbin/ntpdate 10.xx.xx.xx 100.xx.xx.xx  # 手动同步时间

修改ntp配置文件

vi /etc/ntp.conf 添加内网ntp服务器。

image.png

systemctl start ntpd 启动ntpd服务

ntp同步状态查看

1. ntpstat

ntpstat 命令查看时间同步状态,这个一般需要5-10分钟后才能成功连接和同步。所以,服务器启动后需要稍等下。
刚启动的时候,一般是:

# ntpstat
unsynchronised
  time server re-starting
   polling server every 8 s

连接并同步后

# ntpstat
synchronised to NTP server (100.115.8.147) at stratum 4
   time correct to within 1230 ms
   polling server every 64 s

2. ntpq -p

# ntpq -p
   remote           refid      st t when poll reach   delay   offset  jitter
============================================================================
*10.xx.xx.xx  10.175.113.138   3 u   44  128  377    1.065   -0.469   0.087
+100.xx.xx.xx   10.175.113.138   3 u  112  128  377    3.218   -0.986   0.372

*表示目前使用的ntp server;
st:即stratum阶层,值越小表示ntp serve的精准度越高;
when:几秒前曾做过时间同步更新的操作;
Poll表示,每隔多少毫秒与ntp server同步一次;
reach:已经向上层NTP服务器要求更新的次数;
delay:网络传输过程钟延迟的时间;
offset:时间补偿的结果;
jitter:Linux系统时间与BIOS硬件时间的差异时间

相关文章

  • CentOS安装ntp时间同步服务

    CentOS安装ntp时间同步服务 安装ntp 服务端配置 配置文件路径:/etc/ntp.conf [图片上传失...

  • 配置集群时间同步

    配置集群时间同步: 1.时间服务器配置(必须root用户) 检查ntp是否安装 2.修改ntp配置文件 [root...

  • NTP时间同步配置

    测试环境  1、redhat版本:rhel-server-6.8-x86_64-dvd  2、软件版本:ntpda...

  • ntp时间同步配置

    安装 ntp 修改ntp配置文件 vi /etc/ntp.conf 添加内网ntp服务器。 systemctl s...

  • ubuntu 下ntp sever 安装及配置

    安装sudo apt-get install ntp 配置成和本机同步时间 重启service ntp resta...

  • (8)Linux_服务篇_NTP_DHCP

    NTP 描述:中心时间服务器,用于局域网服务器时间同步 安装软件:ntp 1. 配置路径:vim /etc/ntp...

  • 集群时间同步

    时间同步的方式: 配置时间同步具体实操: 时间服务器配置(必须root用户) (1)检查ntp是否安装 (2)修改...

  • 使用NTP时间同步

    安装ntp 1.安装软件 2.配置ntp启动项 3.同步时间 4.启动ntpd服务 配置时间源 配置是否为其他PC...

  • 笔记 时间同步服务器搭建

    ntp配置 需要搭建本地的时间同步服务器(非授时)参考:1.CentOS 6 安装 NTP Server 时间服务...

  • vagrant+centos7+openstackN版配置(二)

    openstack之基础服务配置 时间同步服务(NTP)配置在controller节点上 打开/etc/chron...

网友评论

      本文标题:ntp时间同步配置

      本文链接:https://www.haomeiwen.com/subject/qdvppqtx.html