先安装ntpdate
yum -y install ntpdate
同步时间
ntpdate time.windows.com
选择时区
tzselect
cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
搞定
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
搞定centos的阿里源
先安装ntpdate
yum -y install ntpdate
同步时间
ntpdate time.windows.com
选择时区
tzselect
cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
搞定
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo