Linux系统时间同步_李孟_新浪博客

手动:
date    系统时间
hwclock 硬件时钟
date -s "2017-03-15 19:05:00"
hwclock:
--hctosys   硬件时钟同步到当前系统时间
--systohc   系统时间同步给硬件时钟时间

网络同步时间:
安装 ntp
rpm -qa | grep ntp
yum search ntp
yum install ntp.i386

ntpdate cn.pool.ntp.org


时间同步守护配置文件:
vi /etc/ntp.conf

同步时间服务器
server 0.centos.pool.ntp.org iburst
server 1.centos.pool.ntp.org iburst
server 2.centos.pool.ntp.org iburst
server 3.centos.pool.ntp.org iburst

查看
ps -ef | grep ntpd 
开启
service ntpd start 
centos7 systemctl start  ntpd.service

安装完linux时间不对应,可能是时区不对,也可能是硬件时钟不对应

tzselect 调整时区
选择亚洲-》选择中国北京
posted @ 2017-03-16 11:18  Dlimeng  阅读(7)  评论(0)    收藏  举报  来源