server time1.cloud.tencent.com server time2.cloud.tencent.com server time3.cloud.tencent.com server time4.cloud.tencent.com server time5.cloud.tencent.com
China - 高校与网络中心
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
级 域名 地理位置 负责人 邮件 电话 1 s1a.time.edu.cn 北京邮电大学 王振华 wzhdl at bupt.edu.cn 010-62283044-8003 1 s1b.time.edu.cn 清华大学 尹惠实 yhs at cernet.edu.cn 010-62795818-6105 1 s1c.time.edu.cn 北京大学 马皓 mah at pku.edu.cn 010-62753007
1 s1d.time.edu.cn 东南大学 徐加羚 jlxu at njnet.edu.cn 025-3794342-309 1 s1e.time.edu.cn 清华大学 尹惠实 yhs at cernet.edu.cn 010-62795818-6105 2 s2a.time.edu.cn 清华大学 尹惠实 yhs at cernet.edu.cn 010-62795818-6105 2 s2b.time.edu.cn 清华大学 尹惠实 yhs at cernet.edu.cn 010-62795818-6105 2 s2c.time.edu.cn 北京邮电大学 王振华 wzhdl at bupt.edu.cn 010-62283044-8003 2 s2d.time.edu.cn 西南地区网络中心 董茜 appletung at uestc.edu.cn 028-61830330 2 s2e.time.edu.cn 西北地区网络中心 丁惠宁 dhn at xanet.edu.cn 029-2669037 2 s2f.time.edu.cn 东北地区网络中心 毛宇 maoy at neu.edu.cn 024-23966854 2 s2g.time.edu.cn 华东南地区网络中心 瞿庆海 qqh at sjtu.edu.cn 021-62932901-8101 2 s2h.time.edu.cn 四川大学网络管理中心 郑炳伦 zhengbl at scu.edu.cn 028-85414820 2 s2j.time.edu.cn 大连理工大学网络中心 于广辉 ygh at dlut.edu.cn 0411-4708642 2 s2k.time.edu.cn CERNET桂林主节点 胡进坤 jinkun at mailbox.gxnu.edu.cn 0773-5845246 2 s2m.time.edu.cn 北京大学 马皓 mah at pku.edu.cn 010-62753007
restrict source notrap nomodify noquery restrict ntp.aliyun.com nomodify notrap noquery pool ntp.aliyun.com END
# (3) 重启服务&查看状态&开机自启 sudo systemctl restart ntp sudo systemctl status ntp # ● ntp.service - Network Time Service # Loaded: loaded (/lib/systemd/system/ntp.service; enabled; vendor preset: enabled) # Active: active (running) since Fri 2021-03-19 11:51:19 CST; 2s ago # Docs: man:ntpd(8) # Process: 31997 ExecStart=/usr/lib/ntp/ntp-systemd-wrapper (code=exited, status=0/SUCCESS) # Main PID: 32015 (ntpd) # Tasks: 2 (limit: 9450) # Memory: 1.7M # CGroup: /system.slice/ntp.service # └─32015 /usr/sbin/ntpd -p /var/run/ntpd.pid -g -u 112:117
# Mar 19 11:51:19 dns-server ntpd[32015]: Listen and drop on 0 v6wildcard [::]:123 # Mar 19 11:51:19 dns-server ntpd[32015]: Listen and drop on 1 v4wildcard 0.0.0.0:123 # Mar 19 11:51:19 dns-server ntpd[32015]: Listen normally on 2 lo 127.0.0.1:123 # Mar 19 11:51:19 dns-server ntpd[32015]: Listen normally on 3 ens160 192.168.12.254:123 # Mar 19 11:51:19 dns-server ntpd[32015]: Listen normally on 4 lo [::1]:123 # Mar 19 11:51:19 dns-server ntpd[32015]: Listen normally on 5 ens160 [fe80::250:56ff:fe8a:69b4%2]:123 # Mar 19 11:51:19 dns-server ntpd[32015]: Listening on routing socket on fd #22 for interface updates sudo systemctl enable ntp
# (4) 验证监听情况 ~$ netstat -ulnp | grep ":123" # (Not all processes could be identified, non-owned process info # will not be shown, you would have to be root to see it all.) # udp 0 0 192.168.12.254:123 0.0.0.0:* - # udp 0 0 127.0.0.1:123 0.0.0.0:* - # udp 0 0 0.0.0.0:123 0.0.0.0:* - # udp6 0 0 fe80::250:56ff:fe8a:123 :::* - # udp6 0 0 ::1:123 :::* - # udp6 0 0 :::123 :::* -
描述:由于Redhat8系列的发行版本默认采用Chrony而废弃了ntpd,所以下面主要讲解一下chrony相关的配置; Chrony是NTP(Network Time Protocol,网络时间协议,服务器时间同步的一种协议)的另一种实现与ntpd不同,它可以更快且更准确地同步系统时钟,最大程度的减少时间和频率误差。
# 如果希望记录统计数据,请启用此选项。 #statsdir /var/log/ntpstats/ statistics loopstats peerstats clockstats filegen loopstats file loopstats type day enable filegen peerstats file peerstats type day enable filegen clockstats file clockstats type day enable
# 请指定一个或多个NTP服务器。 - Specify one or more NTP servers. # Use servers from the NTP Pool Project. Approved by Ubuntu Technical Board # on 2011-02-08 (LP: #104525). See http://www.pool.ntp.org/join.html for # more information. #pool 0.ubuntu.pool.ntp.org iburst #pool 1.ubuntu.pool.ntp.org iburst #pool 2.ubuntu.pool.ntp.org iburst #pool 3.ubuntu.pool.ntp.org iburst server ntp1.aliyun.com iburst server ntp2.aliyun.com iburst server 0.cn.pool.ntp.org iburst server 1.cn.pool.ntp.org iburst
# 使用Ubuntu的ntp服务器作为后备。 # Use Ubuntu's ntp server as a fallback. pool ntp.ubuntu.com
# Access control configuration; see /usr/share/doc/ntp-doc/html/accopt.html for # details. The web page <http://support.ntp.org/bin/view/Support/AccessRestrictions> # might also be helpful.
# Local users may interrogate the ntp server more closely. # 当前节点IP地址 restrict 192.168.10.1 nomodify notrap nopeer noquery #集群所在网段的网关(Gateway),子网掩码(Genmask) restrict 192.168.10.1 mask 255.255.255.0 nomodify notrap restrict 192.168.12.254 nomodify notrap nopeer noquery restrict 127.0.0.1 restrict ::1
# Needed for adding pool entries restrict source notrap nomodify noquery
# Clients from this (example!) subnet have unlimited access, but only if # cryptographically authenticated. # restrict 192.168.123.0 mask 255.255.255.0 notrust # 集群所在网段的网关(Gateway),子网掩码(Genmask) restrict 192.168.12.61 mask 255.255.255.0 nomodify notrap
# 如果要为本地子网提供时间,请更改下一行。 # (Again, the address is an example only.) broadcast 192.168.12.255
# 如果你想在你的本地子网上收听时间广播,取消注释 # next lines. Please do this only if you trust everybody on the network! #disable auth #broadcastclient
ntpd - NTP daemon program - Ver. 4.2.8p12 Usage: ntpd [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [ <server1> ... <serverN> ] Flg Arg Option-Name Description -4 no ipv4 Force IPv4 DNS name resolution - prohibits the option 'ipv6' -6 no ipv6 Force IPv6 DNS name resolution - prohibits the option 'ipv4' -a no authreq Require crypto authentication - prohibits the option 'authnoreq' -A no authnoreq Do not require crypto authentication - prohibits the option 'authreq' -b no bcastsync Allow us to sync to broadcast servers -c Str configfile configuration file name -d no debug-level Increase debug verbosity level - may appear multiple times -D Num set-debug-level Set the debug verbosity level - may appear multiple times -f Str driftfile frequency drift file name -g no panicgate Allow the first adjustment to be Big - may appear multiple times -G no force-step-once Step any initial offset correction. -i Str jaildir Jail directory -I Str interface Listen on an interface name or address - may appear multiple times -k Str keyfile path to symmetric keys -l Str logfile path to the log file -L no novirtualips Do not listen to virtual interfaces -n no nofork Do not fork - prohibits the option 'wait-sync' -N no nice Run at high priority -p Str pidfile path to the PID file -P Num priority Process priority -q no quit Set the time and quit - prohibits these options: saveconfigquit wait-sync -r Str propagationdelay Broadcast/propagation delay Str saveconfigquit Save parsed configuration and quit - prohibits these options: quit wait-sync -s Str statsdir Statistics file location -t Str trustedkey Trusted key number - may appear multiple times -u Str user Run as userid (or userid:groupid) -U Num updateinterval interval in seconds between scans for new or dropped interfaces Str var make ARG an ntp variable (RW) - may appear multiple times Str dvar make ARG an ntp variable (RW|DEF) - may appear multiple times -w Num wait-sync Seconds to waitfor first clock sync - prohibits these options: nofork quit saveconfigquit -x no slew Slew up to 600 seconds opt version output version information and exit -? no help display extended usage information and exit -! no more-help extended usage information passed thru pager
# 1.在第3层同步到NTP服务器(120.25.115.20),时间在56毫秒内纠正,每隔1024秒轮询一次服务器。 $ ntpstat synchronised to NTP server (120.25.115.20) at stratum 3 time correct to within 56 ms polling server every 1024 s
ntpq - standard NTP query program - Ver. 4.2.8p12 Usage: ntpq [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [ host ...] Flg Arg Option-Name Description -4 no ipv4 Force IPv4 name resolution - prohibits the option 'ipv6' -6 no ipv6 Force IPv6 name resolution - prohibits the option 'ipv4' -c Str command run a command and exit - may appear multiple times -d no debug-level Increase debug verbosity level - may appear multiple times -D Num set-debug-level Set the debug verbosity level - may appear multiple times -i no interactive Force ntpq to operate in interactive mode - prohibits these options: command peers -n no numeric numeric host addresses no old-rv Always output status line with readvar -p no peers Print a list of the peers - prohibits the option 'interactive' -r KWd refid Set default display typefor S2+ refids -w no wide Display the full 'remote' value opt version output version information and exit -? no help display extended usage information and exit -! no more-help extended usage information passed thru pager -> opt save-opts save the option state to a config file -< Str load-opts load options from a config file - disabled as '--no-load-opts' - may appear multiple times
方式1.请访问本博主的B站【WeiyiGeek】首页关注UP主, 将自动随机获取解锁验证码。
Method 2.Please visit 【My Twitter】. There is an article verification code in the homepage.
方式3.扫一扫下方二维码,关注本站官方公众号
回复:验证码
将获取解锁(有效期7天)本站所有技术文章哟!