zoukankan      html  css  js  c++  java
  • CentOS7系列--2.1CentOS7中安装配置NTP服务

    CentOS7安装配置NTP服务

    NTP服务是时间同步服务

    1. 安装NTPd

    [root@centos7 ~]# yum install -y ntp

    [jack@centos7 ~]$ vi /etc/ntp.conf

    添加如下的代码

    restrict 192.168.0.0 mask 255.255.0.0 nomodify notrap

    更改时间同步服务器

    #server 0.centos.pool.ntp.org iburst

    #server 1.centos.pool.ntp.org iburst

    #server 2.centos.pool.ntp.org iburst

    #server 3.centos.pool.ntp.org iburst

    server ntp1.jst.mfeed.ad.jp iburst

    server ntp2.jst.mfeed.ad.jp iburst

    server ntp3.jst.mfeed.ad.jp iburst

    [root@centos7 ~]# systemctl start ntpd

    [root@centos7 ~]# systemctl enable ntpd

    2. 设置防火墙,允许NTP服务使用123/UDP

    [root@centos7 ~]# firewall-cmd --add-service=ntp –permanent

    [root@centos7 ~]# firewall-cmd –reload

    3. 验证

    [root@centos7 ~]# ntpq -p

    remote refid st t when poll reach delay offset jitter

    ==============================================================================

    *leontp.ccgs.wa. .GPS. 1 u 2 64 15 443.939 -3.250 4.178

    +120.25.115.19 10.137.38.86 2 u 62 64 17 49.708 9.697 6.603

    +ntp-sz.chl.la 202.118.1.46 2 u 59 64 17 41.490 13.642 5.630

    -202.118.176.2 202.118.177.155 4 u 34 64 37 54.802 27.184 4.129

  • 相关阅读:
    LYDSY模拟赛day3 序列
    LYDSY模拟赛day3 涂色游戏
    LYDSY模拟赛day3 平均数
    hdu1757 A Simple Math Problem
    清北国庆day1 (脑)残
    poj3070 Fibonacci
    uva10870 递推关系Recurrences
    湖南附中模拟day1 瞭望塔
    湖南附中模拟day1 收银员
    湖南附中模拟day1 金坷垃
  • 原文地址:https://www.cnblogs.com/gispathfinder/p/8833138.html
Copyright © 2011-2022 走看看