前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >Linux系统时间同步

Linux系统时间同步

作者头像
Dlimeng
发布2023-06-28 15:54:12
2750
发布2023-06-28 15:54:12
举报
文章被收录于专栏:开源心路开源心路

手动:

date    系统时间

hwclock 硬件时钟

date -s "2017-03-15 19:05:00"

hwclock:

--hctosys   硬件时钟同步到当前系统时间

--systohc   系统时间同步给硬件时钟时间

网络同步时间:

安装 ntp

rpm -qa | grep ntp

yum search ntp

yum install ntp.i386

ntpdate cn.pool.ntp.org

时间同步守护配置文件:

vi /etc/ntp.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

查看

ps -ef | grep ntpd 

开启

service ntpd start 

centos7 systemctl start  ntpd.service

安装完linux时间不对应,可能是时区不对,也可能是硬件时钟不对应

tzselect 调整时区

选择亚洲-》选择中国北京

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2017-03-16,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档