首页天道酬勤安卓配置ntp时间同步(linux服务器时间同步)

安卓配置ntp时间同步(linux服务器时间同步)

admin 12-20 09:13 513次浏览

chrony APP本身已经有几年了,是网络时间协议(NTP )的另一种实现。 迄今为止,许多版本中标准化的是ntpd配对服务,从rhel7/centos7开始,Chrony作为版本中的标准化服务使用,但旧的ntpd服务在rhel7/centos7中也可以使用。 Chrony既可以作为ntp服务器的客户端,也可以作为服务器端。 默认安装完成后,有chronyd和chronyc两个程序。 chronyd是在系统后台运行的守护程序,chronyc是用于监视chronyd性能和设置参数的程序。

chrony时间同步软件,现在是centos7系统默认附带的。 如果没有安装,则使用yum-y安装频道下载。

配置

ntp服务-客户端配置

1.更改配置文件/etc/chrony.conf

设置服务器的ip地址(服务器服务器_ IP I burst #选择要同步的服务器) ) ) ) ) ) ) ) ) ) ) ) ) ) ) )。

或者,公共网北京时间提供的服务器为ntpip1、ntpip2

tce环境打开的虚拟机默认设置为ntp。

# # usepublicserversfromthepool.NTP.org项目。

# # pleaseconsiderjoiningthepool (http://www.pool.NTP.org/join.html )。

# #服务器0.centos.pool.NTP.org I burst

# #服务器1.centos.pool.NTP.org I burst

# #服务器2.centos.pool.NTP.org I burst

# #服务器3.centos.pool.NTP.org I burst

服务器NTP IP1I burst

# # ignorestratuminsourceselection。

串流权重0

# # recordtherateatwhichthesystemclockgains/losses时间。

差分文件/变量/库/克隆/漂移

# # enablekernelrtcsynchronization

同步

# # infirstthreeupdatesstepthesystemclockinsteadofslew

# # iftheadjustmentislargerthan 10秒。

make步骤10 3

# # allowntpclientaccessfromlocalnetwork。

#allow 192.168/16

# # listenforcommandsonlyonlocalhost。

bindcmdaddress 127.0.0.1

bindcmdaddress :1

# # servetimeevenifnotsynchronizedtoanyntpserver

# #本地风暴10

keyfile /etc/chrony.keys

# # specifythekeyusedaspasswordforchronyc。

命令密钥1

# #生成命令密钥if missing。

generatecommandkey

# # disableloggingofclientaccesses。

美国国家日志

# # sendamessagetosyslogifaclockadjustmentislargerthan 0.5秒。

日志更改0.5

logdir /var/log/chrony

# # logmeasurementsstatisticstracking

2 .重新启动服务systemctl重新启动克隆yd

3 .显示客户端同步结果

chronyc sources -v #-V也可以,但如果结果为^*,则同步完成

ntp服务-服务端搭建配置

中,不建议使用虚拟机作为ntp服务器

建议使用物理机或专用的ntp服务器作为ntp服务器

服务器主配置文件、vim /etc/chrony.conf、allow配置的更改# usepublicserversfromthepool.NTP.org项目。

# # pleaseconsiderjoiningthepool (http://www.pool.NTP.org/join.html )。

# #服务器0.centos.pool.NTP.org I burst

# #服务器1.centos.pool.NTP.org I burst

# #服务器2.centos.pool.NTP.org I burst

# #服务器3.centos.pool.NTP.org I burst

# # recordtherateatwhichthesystemclockgains/losses时间。

差分文件/变量/库/克隆/漂移

# # allowthesystemclocktobesteppedinthefirstthreeupdates

# # ifitsoffsetislargerthan 1第二个。

make步骤1.0 3

# # enablekernelsynchronizationofthereal -时间时钟(RTC )。

同步

# # enablehardwaretimestampingonallinterfacesthatsupportit。

# # HW时间戳*

# # increasetheminimumnumberofselectablesourcesrequiredtoadjust

# #系统时钟。

# #最小源2

# # allowntpclientaccessfromlocalnetwork。

allow 127.0.0.1 #谁允许同步我的时间

# # servetimeevenifnotsynchronizedtoatimesource。

local stratum 10 #任何人的时间都不同步

# # specifyfilecontainingkeysforntpauthentication。

# #关键文件/ETC/Chrony.keys

# #指定目录为日志文件。

logdir /var/log/chrony

# # selectwhichinformationislogged。

# # logmeasurementsstatisticstracking

2 .重新启动系统重新启动克隆yd #服务

如果系统停止防火墙d #防火墙未关闭,则必须将其关闭

三、NTP 服务器列表

Windows系统附带的两个: time.windows.com和time.nist.govMacOS附带的两个: time.apple.com和time.Asia.appom

1、阿里云授时服务器<168飞艇6种不亏钱的方法NTP.org I burst

# #服务器3.centos.pool.NTP.org I burst

# # recordtherateatwhichthesystemclockgains/losses时间。

差分文件/变量/库/克隆/漂移

# # allowthesystemclocktobesteppedinthefirstthreeupdates

# # ifitsoffsetislargerthan 1第二个。

make步骤1.0 3

# # enablekernelsynchronizationofthereal -时间时钟(RTC )。

同步

# # enablehardwaretimestampingonallinterfacesthatsupportit。

# # HW时间戳*

# # increasetheminimumnumberofselectablesourcesrequiredtoadjust

# #系统时钟。

# #最小源2

# # allowntpclientaccessfromlocalnetwork。

allow 127.0.0.1 #谁允许同步我的时间

# # servetimeevenifnotsynchronizedtoatimesource。

local stratum 10 #任何人的时间都不同步

# # specifyfilecontainingkeysforntpauthentication。

# #关键文件/ETC/Chrony.keys

# #指定目录为日志文件。

logdir /var/log/chrony

# # selectwhichinformationislogged。

# # logmeasurementsstatisticstracking

2 .重新启动系统重新启动克隆yd #服务

如果系统停止防火墙d #防火墙未关闭,则必须将其关闭

三、NTP 服务器列表

Windows系统附带的两个: time.windows.com和time.nist.govMacOS附带的两个: time.apple.com和time.Asia.appom

1、阿里云授时服务器

#NTP服务器ntp.aliyun.com

2、国外授时服务器

#NTP服务器

time .谷歌.com

time .苹果.com

kali最新国内更新源sources怎么更换雷士灯具管理系统
esxi只能用于服务器吗(esxi做无盘服务器) ntp协议使用的端口(ntp配置文件详解)
相关内容