# centos7 更新同步时间
yum install -y ntpdate # 安装工具
tzselect # 设置选择时区,顺序:4 选择asina 再选择china 再北京再 yes 选择序号
rm -rf /etc/localtime ; ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
# 将之前的删除,然后创建软连接到文件:/etc/localtime
echo "
LANG="en_US.utf8"
LC_TIME=en_DK.UTF-8
" > /etc/default/locale # 将时间设置为 24小时模式, reboot 重启服务器 生效
ntpdate -u cn.pool.ntp.org # 同步时间
timedatectl list-timezones # 列出时区
timedatectl set-timezone Asia/Shanghai # 设置区域
systemctl start ntpd # 启动时间
systemctl enable ntpd # 开机启动:自动同步
# centos8 更新时间
rpm -ivh http://mirrors.wlnmp.com/centos/wlnmp-release-centos.noarch.rpm
dnf install wntp -y
ntpdate ntp3.aliyun.com
echo "*/3 * * * * ntpdate ntp3.aliyun.com &> /dev/null" > /tmp/crontab
crontab /tmp/crontab
其他网络时间服务器地址如下:(也可以自己去搜索下)
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
210.72.145.44 也是一个不错的地址,速度很快!
Powered by ddoss.cn 12.0
©2015 - 2025 ddoss
渝公网安备50011302222260号
渝ICP备2024035333号
【实验平台安全承诺书】
小绿叶技术社区,优化网络中,点击查看配置信息
主机监控系统: 安全防火墙已开启检查cc攻击-下载文件完成后等待10s 恢复访问,检查连接数低于峰值恢复访问
您的IP:216.73.216.110,2025-12-01 17:43:50,Processed in 0.01521 second(s).