centos 调整系统时间

方法一:
1:
yum install -y ntp
2:
cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
3:
ntpdate us.pool.ntp.org
4:
查看一下:
date

使用ftp服务需求停止防火墙
service iptables stop

方法二:
centos 系统时间同步
1:必须是root下进行

2:安装ntp
$yum install ntp

3: 时间同步
注意:必须是从root登陆的才行,用sudo -s 和 su -是不行的
$ntpdate time.windows.time

4: 查看当前时间信息,看看是否同步了
$date

猜你喜欢

转载自datalife.iteye.com/blog/802339