Centos 系统时间同步网络时间

耗尽温柔 提交于 2020-07-29 08:49:52

Centos 系统时间同步网络时间

  • 调整时区

    cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
  • 同步时间服务器

    ntpdate ntp1.aliyun.com
  • 阿里云的ntp服务器

    ntp1.aliyun.com
    ntp2.aliyun.com
    ntp3.aliyun.com
    ntp4.aliyun.com
    ntp5.aliyun.com
    ntp6.aliyun.com
    ntp7.aliyun.com
  • 没有ntpdate命令可以yum安装

    yum install -y ntpdate

    可以安装ntp服务持续同步时间

    yum install -y ntp
    ## 启动服务
    service ntpd start

配置文件:/etc/ntp.conf

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!