zoukankan      html  css  js  c++  java
  • centos6安装部署ntp

    环境:

    OS:Centos 6

    1.检查ntp是否安装
    [root@localhost /]# rpm -qa|grep ntp
    ntp-4.2.6p5-1.el6.centos.x86_64
    ntpdate-4.2.6p5-1.el6.centos.x86_64
    fontpackages-filesystem-1.41-1.1.el6.noarch

    2.修改配置
    vi /etc/ntp.conf

    //添加如下配置内容

    //默认允许任何主机进行时间同步

    restrict default ignore

    server cn.pool.ntp.org perfer
    server 0.cn.pool.ntp.org
    server 1.cn.pool.ntp.org
    server asia.pool.ntp.org
    server 0.asia.pool.ntp.org
    server 1.asia.pool.ntp.org


    restrict cn.pool.ntp.org nomodify notrap noquery
    restrict 0.cn.pool.ntp.org nomodify notrap noquery
    restrict 1.cn.pool.ntp.org nomodify notrap noquery
    restrict asia.pool.ntp.org nomodify notrap noquery
    restrict 0.asia.pool.ntp.org nomodify notrap noquery
    restrict 1.asia.pool.ntp.org nomodify notrap noquery


    server 127.127.1.0 # local clock
    fudge 127.127.1.0 stratum 10

    3.设置开机自启动
    [root@localhost /]# chkconfig ntpd on

    4.启动NTP服务
    [root@localhost /]#service ntpd start
    [root@localhost /]# service ntpd status

    5.查看
    ntpstat
    ntpq -p

  • 相关阅读:
    0719PHP基础:PDO
    0717PHP基础:面向对象
    0716PHP基础:面向对象
    0715JS基础:ajax
    0715PHP练习:文件操作
    0715PHP基础:文件操作
    0629正则表达式:基础
    0628正则表达式:练习
    zTree简单使用和代码结构
    servlet
  • 原文地址:https://www.cnblogs.com/hxlasky/p/15667998.html
Copyright © 2011-2022 走看看