centos同步服务器时间,以及更改时区、时间
工具/原料
centos系统
连接工具xshell
centos7
1、查看系统时间Date -R
2、查看系统版本cat/etc/redhat-release
3、ntpdate安装命令:yum install -y ntpdate
4、用ntpdate同步时间命令:ntpdate -u cn.pool.ntp.org
5、设置国内时间timedatectl set-timezone Asia/Shanghai
6、再次查看时间Date -R,centos7设置时间教程完。下面是centos6.5的教程
7、centos6.5设置时区方法:cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
8、写入硬件hwclock -w 完