EsxServer 的时间同步设置

简介:
EsxServer  的时间同步设置

 
我的服务器出现了这样的情况,EsxServer 启动的时候,长时间停止在时间同步的位置,最后显示失败“ntpd Synchronizing with time server    [FAILED]

本文解决了此问题,并可以作为配置ESx时间同步的参考

主要是设置ntp同步的服务器地址,在防火墙上允许ntpClient通过

如果想让此台Esxserver成为NTP的服务器,可以将firewall服务停掉

 
配置过程

 
1# service ntpd restart 重启服务

Shutting down ntpd:                                        [  OK  ]

ntpd: Synchronizing with time server: tail /var/                   [FAILED]

Starting ntpd:                                              [  OK  ]

显示同步失败

 
2# tail /var/log/messages 查看日志

Apr 14 10:39:41 VmServer07 ntpd: ntpd shutdown succeeded

Apr 14 10:39:41 VmServer07 ntpdate[3402]: can't find host server

Apr 14 10:39:50 VmServer07 ntpdate[3402]: no server suitable for synchronization             found

Apr 14 10:39:50 VmServer07 ntpd:  failed

显示没有合适的同步服务器

 
3# vi /etc/ntp.conf  查看ntp服务配置文件

restrict kod nomodify notrap noquery nopeer

restrict 127.0.0.1

server 127.127.1.0

driftfile /var/lib/ntp/drift

# Authentication delay.  If you use, or plan to use someday, the

修改server地址为192.168.40.5192.168.40.5为可用的ntp服务器地址)

 
4# vi/etc/ntp/step-tickers 修改server地址为192.168.40.5

Server 192.168.40.5

如果想让次Esxserver做为NTP服务器可以在此添加网络上的NTPServer地址,比如教育网可以添加成

server s2a.time.edu.cn

server s2b.time.edu.cn

server s2c.time.edu.cn

server s2d.time.edu.cn

server s2e.time.edu.cn

 
4# esxcfg-firewall –q ntpClient

Service ntpClient is blocked.

显示客户端的查询服务被阻止

 
5esxcfg-firewall  --enableService ntpClient

开启ntp的客户端查询服务,Esx做为客户端就可以和192.168.40.5进行时间同步了。

 

6:所有设定完成,检验一下可否域时间服务器192.168.40.5同步时间

# service ntpd restart

Shutting down ntpd:                                        [  OK  ]

ntpd: Synchronizing with time server:                          [  OK  ]

Starting ntpd:                                             [  OK  ]

# ntpdate –u 192.168.40.5 手动同步时间

14 Apr 16:56:11 ntpdate[3092]: adjust time server 192.168.40.5 offset -0.006880 sec

 
7:# chkconfig  --level 345 ntpd on  设置ntpd服务自动启动

 

8:# watch  “ntpq -p”  可以查询ntpd进程运行状态



本文转自 abner110 51CTO博客,原文链接:http://blog.51cto.com/abner/149701,如需转载请自行联系原作者
目录
打赏
0
0
0
0
18
分享
相关文章
|
9月前
|
配置时间同步服务
在Redhat 9.2上,Chrony被用来同步系统时间与NTP服务器。默认情况下,它已在RHEL7/CentOS7中预装。要安装,首先通过`yum -y remove chrony`卸载,然后用`yum -y install chrony`进行安装。安装后,使用`systemctl restart chronyd`重启服务,并用`systemctl enable chronyd`设置开机启动。编辑`/etc/chrony.conf`添加阿里云NTP服务器如`ntp1.aliyun.com`和`ntp2.aliyun.com`以同步时间。使用`chronyc sources -n`确认时间源。
503 4
NTP设置时间同步
应用场景 公司分配给你三台服务器,要求你使他们时间同步,有人问为什么要时间同步?如果一个集群中,时间相差很大,那么会出现很多诡异的问题,你也不想在一个无法解决的问题上浪费几天时间吧!总之,设置服务器之间时间同步,为了避免很...
3641 0
NTP 服务介绍和配置时间同步
本文介绍了时间服务器常用的二种协议:SNTP和TIME,并就局域网环境下Linux时间服务的设置进行了说明,最终实现整个局域网环境下所有电脑时钟的同步与校准。 1、什么是网络时间服务 网络时间服务Net Time Service与网络文件下载服务FTP、网络浏览服务WWW等一样,是一种网络服务,提供网络时间服务的电脑叫网络时间服务器。
4305 0
NTP 时间同步服务配置
中国国家授时中心:210.72.145.44   -- 无法使用 NTP服务器(上海) :ntp.api.bz 中国ntp服务器:    cn.pool.ntp.org      pool.ntp.
994 0

热门文章

最新文章

AI助理

你好,我是AI助理

可以解答问题、推荐解决方案等