服务器时间同步

一、安装ntpddate

#centos,redhat系列
yum install ntpdate

#debian,ubuntu系列
apt install ntpdate

二、在服务器都能联网情况下时间同步

#手动同步阿里云时间服务器时间
ntpdate ntp.aliyun.com 

阿里云时间同步地址

ntp1.aliyun.com
ntp2.aliyun.com
ntp3.aliyun.com
ntp4.aliyun.com
ntp5.aliyun.com
ntp6.aliyun.com
ntp7.aliyun.com

三、查看时间并互相同步

#查看系统时间
date
#查看硬件时间
clock

系统时间同步到硬件时间

hwclock -w

硬件时间同步到系统时间

hwclock -s

image

posted @   买定灬离手  阅读(52)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· Manus的开源复刻OpenManus初探
· AI 智能体引爆开源社区「GitHub 热点速览」
· 三行代码完成国际化适配,妙~啊~
· .NET Core 中如何实现缓存的预热?
历史上的今天:
2023-09-06 mysql 执行sql 文件
点击右上角即可分享
微信分享提示