zoukankan      html  css  js  c++  java
  • 时间同步ntp服务的安装与配置(作为客户端的配置)

    1、安装ntp服务,要使用时间同步、那么服务端与客户端都需要使用如下命令安装NTP软件包

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

    2、如果只是作为客户端的话,配置则可以非常简单,编辑/etc/ntp.conf文件,注释掉默认的如下默认的4行

    再加上我们的时间同步服务端的IP地址或者域名即可。

    #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 //其中iburst :当一个运程NTP服务器不可用时,向它发送一系列的并发包进行检测。
     server 192.168.100.140       iburst

    3、然后重启ntpd.service服务,即可向上级NTP服务器进行时间同步

    #systemctl restart ntpd.service
    

    4丶最后输入data看时间是否与服务器同步

    #data
  • 相关阅读:
    Oracle第一课
    Web前端试题
    E
    Kingdom of Black and White
    D. Let's Go Hiking
    2021牛客寒假 第一场
    Codeforces Round #691 (Div. 2)
    CF1461D
    CF1461B
    浙财16th校赛 F因子
  • 原文地址:https://www.cnblogs.com/centos7/p/5946968.html
Copyright © 2011-2022 走看看