天天看点

Linux实战(13):Centos8 同步时间

前言

以下操作是通过

ntpdate

命令实现同步
timedatectl set-timezone Asia/Shanghai 
# 设置时区
rpm -ivh http://mirrors.wlnmp.com/centos/wlnmp-release-centos.noarch.rpm
# 添加 wlnmp yum源
yum install wntp
#安装工具
ntpdate ntp1.aliyun.com
#使用阿里云时间服务器同步时间
           

测试

[root@test ~]# date
Thu May 14 02:00:04 EDT 2020