centos服务器从阿里云同步时间

  1. 安装ntpdate

    bash 复制代码
    yum -y install ntpdate
  2. 同步一次时间

    bash 复制代码
    ntpdate ntp1.aliyun.com
  3. 使用定时任务同步时间

    编辑定时任务:

    bash 复制代码
    crontab -e

    添加定时任务:

    bash 复制代码
    */10 * * * * ntpdate ntp1.aliyun.com

    查看定时任务:

    bash 复制代码
    crontab -l
  4. 查看当前服务器时间

    bash 复制代码
    date -R
相关推荐
IMPYLH5 小时前
Linux 的 pinky 命令
linux·运维·服务器·bash
REDcker5 小时前
Linux iptables 与 Netfilter:原理、路径与运维要点
linux·运维·服务器
无忧.芙桃9 小时前
进程控制(上)
linux·运维·服务器
航Hang*9 小时前
Windows Server 配置与管理——第8章:配置Web服务器
运维·服务器·windows·学习·vmware
hweiyu0010 小时前
Linux命令:suspend
linux·运维·服务器
code_li10 小时前
服务器与普通PC区别?
运维·服务器
小天互连即时通讯11 小时前
中小企业本地部署即时通讯:预算有限怎么把功能配齐
运维·服务器·网络
cyber_两只龙宝11 小时前
【Docker】Docker的资源限制
linux·运维·服务器·docker·云原生·容器
Jaygee-11 小时前
GMSSH 是什么?一款面向 AI 时代的可视化服务器运维系统
运维·服务器
赴前尘12 小时前
Linux/Unix 系统中以后台方式运行程序
linux·服务器·unix