配置虚拟机时间使其与国内时间同步,linux时间 ntp

配置虚拟机时间使其与国内时间同步,linux时间 ntp

设置系统时间

[[email protected] ~]# date -s "10/30/18 09:30:00"
Tue Oct 30 09:30:00 PDT 2018
[[email protected] ~]# date
Tue Oct 30 09:30:10 PDT 2018

设置硬件时间
[[email protected] ~]# clock --set --date="10/30/18 09:32:00"

同步硬件时间为系统时间
[[email protected] ~]# clock --systohc
[[email protected] ~]#
[[email protected] ~]# date
Tue Oct 30 09:31:33 PDT 2018

yum -y install ntpdate

ntpdate -u 202.120.2.101

配置虚拟机时间使其与国内时间同步,linux时间 ntp

 更改时区

# timedatectl list-timezones |grep Shanghai    #查找中国时区的完整名称
Asia/Shanghai
# timedatectl set-timezone Asia/Shanghai    #其他时区以此类推

    

参考文档:

1.https://www.cnblogs.com/st-jun/p/7737188.html

 

posted @ 2017-06-20 16:53 酸奶加绿茶 阅读(...) 评论(...) 编辑 收藏