linux 时间自动同步
2013-02-22 17:26
309 查看
linux系统修改时区,时间自动同步
博客分类: Linux
1、调整时区
cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
linux提供是依据/etc/localtime文件内容知道目前系统的时区信息,这个文件一般是从/usr/share/zone/里面选择适当的时区复制过来就可以使用
2、手动调整时间(需要ntpdate)
ntpdate us.pool.ntp.org
没有安装ntpdate可以
yum install -y ntpdate
3、加入定时计划任务,每天进行同步一次:
在’/etc/cron.daily’ 目录中建立一个脚本’ntpupdate’,內容如下表所示:
#! /bin/bash /usr/sbin/ntpdate -s us.pool.ntp.org /usr/sbin/hwclock --systohc |
# chmod +x /etc/cron.daily/ntpupdate |
中国国家授时中心:
http://www.time.ac.cn/stime.asp
其他网络时间服务器地址如下
time.nist.gov(美国)
ntp.fudan.edu.cn(复旦)(国内用户推荐使用此服务器)
timekeeper.isi.edu
subitaneous.cpsc.ucalgary.ca
usno.pa-x.dec.com
time.twc.weather.com
swisstime.ethz.ch
ntp0.fau.de
ntp3.fau.de
time-a.nist.gov
time-b.nist.gov
time-nw.nist.gov
nist1-sj.glassey.com
相关文章推荐
- Linux 系统时间查看 及 时区修改(自动同步时间)
- linux开机实现时间自动同步
- CentOS/Linux 自动同步服务器时间
- 自动调整linux系统时间和时区与Internet时间同步
- 自动调整linux系统时间和时区与Internet时间同步
- Linux 自动同步时间
- Linux 自动同步服务器时间
- Linux下自动调整时间和时区与Internet时间同步
- 设置CentOS Linux系统时间自动同步
- Linux 时间自动同步
- linux自动同步时间
- linux自动同步时间
- 自动调整linux系统时间和时区与Internet时间同步
- 【转载】Linux 系统时间查看 及 时区修改(自动同步时间)
- Linux配置自动时间同步
- Linux时间自动同步
- linux时间是如何自动同步的
- Linux配置自动时间同步
- 自动调整linux系统时间和时区与Internet时间同步
- 自动调整linux系统时间和时区与Internet时间同步