天天看点

centos7 安装ntp服务

服务端

    1.服务端安装ntpd服务

    yum install  ntp

    2.修改配置文件,配置文件在/etc/ntpd.conf

    注释或者删除以下四行

    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  127.127.1.0

    3.启动ntp

    systemctl restart ntpd

客户端:

    ntpdate 192.168.3.184

继续阅读