linux系統修改時區,時間自動同步

2021-09-01 01:26:08 字數 639 閱讀 3380

』/etc/cron.daily

』目錄中建立乙個指令碼

』ntpupdate

』,內容如下表所示:

#! /bin/bash

/usr/sbin/ntpdate -s us.pool.ntp.org

/usr/sbin/hwclock --systohc

另用下列指令設定此指令碼為可執行:

# chmod +x /etc/cron.daily/ntpupdate

中國國家授時中心:

其他網路時間伺服器位址如下

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修改時間 時區

前段時間公司安裝集群,遇見了統一時間的問題,特此記錄一下 檢視系統時間 date設定系統時間 date set 07 07 06 10 19 月 日 年 時 分 秒 將當前時間和日期寫入bios,避免重啟後失效 命令 hwclock w 檢視硬體時間 hwclock show或者 clock sho...

linux系統修改時區

1 現在系統的時區為utc 2 修改utc時區為cst時區 1 修改時區檔案 cp usr share zoneinfo asia shanghai etc localtime zone asia shanghai utc false 使修改生效 source etc sysconfig clock...

Linux系統修改時區及時間 整理

一 檢視和修改linux的時區 1.檢視當前時區 命令 date r 2.修改設定linux伺服器時區 方法 a 命令 tzselect 方法 b 僅限於redhat linux 和 centos 命令 timeconfig 方法 c 適用於debian 命令 dpkg reconfigure tz...