由于上海服务器时间不统一可能造成发布警告及其他问题,使用以下方案尝试解决该问题
一.时间服务器的设定
1.选定172.26.166.114作为时间服务器,对NTP配置文件/etc/ntp.conf设定如下
# Permit time synchronization with our time source, but do not
# permit the source to query or modify the service on this system.
restrict default kod nomodify notrap nopeer noquery
restrict -6 default kod nomodify notrap nopeer noquery
# Permit all access over the loopback interface. This could
# be tightened as well, but to do so would effect some of
# the administrative functions.
restrict 127.0.0.1
restrict -6 ::1
restrict 172.26.166.0 mask 255.255.255.0 nomodify
# Hosts on local network are less restricted.
#restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap
…………
2.设定NPT服务重启动
service ntpd restart
3.设定NPT服务在系统引导时启动
chkconfig ntpd on
二.客户端设定
1.在需同步的服务器上使用Crontab定时更新,目前定为1天更新一次
##################################################
#time syn
##################################################
* */24 * * * root /usr/sbin/ntpdate 172.26.176.214;/sbin/hwclock -w
2.设定系统启动时同步时间,在/etc/init.d/下新建脚本文件(sysServerDate)
#!/bin/ksh
# chkconfig: 345 63 37
# description: update date to 172.26.176.214
/usr/sbin/ntpdate 172.26.176.214;/sbin/hwclock -w
3.设定同步脚本在系统引导时启动
chmod 755 sysServerDate
chkconfig sysServerDate on
分享到:
相关推荐
S7-1500控制器与在线NTP服务器的时间同步
各种时间同步的方法,包括windows,linux, HP-unix,sun solaris, ibm aix等操作系统,及cisco路由器,华为路由器,天融信防火墙的时间同步方法步骤,决对值得收藏。
自动从NTP服务器获取时间并同步本地时间,新测可用,C#,WinForm
1、服务器时间同步简介; 2、Linux下时间服务程序的安装; 3、局域网内NTP服务器的安装、配置、运维操作; 4、Linux系统时间同步设置; 5、Windows 7系统时间同步设置; 6、Windows Server 2008系统时间同步设置。 ...
通过注册表,实时本机同时作为时间服务器,或者客户端,实现时间同步。 实现平台,Windows2000,XP,Win7。可以与任何一台服务器相连,也可以自己也自己相连。需要完全C++代码的加QQ:182392810
AD域中客户端时间与服务器时间不同步的解决办法
多服务器间时间同步。
CentOS 8 服务器之间Chrony时间同步. 常用命令
和php空间服务器时间同步.rar
远程服务器时间同步-精品源代码 远程服务器时间同步-精品源代码
windows server 配置 NTP 时间同步服务器.txt
linux下实现多台服务器间系统时间同步
server2003作为服务器时间同步的问题
威伦通NTP服务器搭建流程(计算机时间与触摸屏时间同步).pdf
vfp代码,经常遇到本地电脑与服务器时间不一致,这个程序就是用来测试本地电脑是不是跟服务器时间一致,如果不一致,就将本地时间修改为服务器时间。
windows时间同步,可手动设置时间服务器IP,可同步XP,win7,win10 操作系统,经测试稳定运行。
Linux部署NTP服务器进行时间同步,,根据你的实际性况,时间不同步,该如何处理,而又没有办法的情况下详细操作步骤。
Windows 系统下,时间同步服务器 ntp-4.2.4,安装时间服务,端口123
在一些购物商城经常看到有很多商品做秒杀活动,也就是倒计时,本篇文章给大家介绍Javascript实现商品秒杀倒计时(时间与服务器时间同步),需要的朋友可以了解下
解决安卓设备内网状态无法与互联网时间同步问题,通过架设NTP服务器端口,安卓端连接内网WIFI后自动与NTP服务器时间同步。