CentOS虚拟机时间设置


1、vi /etc/sysconfig/clock   #编辑文件
ZONE="Asia/Shanghai"
UTC=false                          #设置为false,硬件时钟不于utc时间一致
ARC=false

2、ln -sf /usr/share/zoneinfo/Asia/Shanghai    /etc/localtime    #linux的时区设置为上海
3、ntpdate asia.pool.ntp.org    #对准时间,需要先安装ntp服务器 yum install ntp
4、/sbin/hwclock --systohc   #设置硬件时间和系统时间一致并校准



转载自:http://www.osyunwei.com/archives/528.html

猜你喜欢

转载自blog.csdn.net/MyHeartIsYours/article/details/52062987