NTP服务器搭建与测试
来源:互联网 发布:部落冲突三王升级数据 编辑:程序博客网 时间:2024/06/06 03:25
服务器
首先是安装:
sudo apt-get install ntp
修改配置文件(ntp仅有的配置文件):
sudo vi /etc/ntp.conf
# 如果进行局域网配置,可参考如下:# Specify one or more NTP servers.server 192.168.0.100 #这个是该ntp server 的上层server# 配置可以访问该server的网段restrict 192.168.5.0 mask 255.255.255.0 nomodify notrap
# 如果可以联网,可配置公用的NTP server:# Specify one or more NTP servers. server 0.cn.pool.ntp.org server 1.cn.pool.ntp.org server 2.cn.pool.ntp.org server 3.cn.pool.ntp.org
配置完成重启ntp 服务:
sudo /etc/init.d/ntp restart
查看ntp 运行状态
ntpq -p
remote refid st t when poll reach delay offset jitter==============================================================================*192.168.0.100 LOCAL(0) 11 u 209 256 377 0.131 0.793 0.226 LOCAL(0) .LOCL. 10 l 108m 64 0 0.000 0.000 0.000
客户端
客户端同样安装ntp 服务,进行配置:
sudo vi /etc/ntp.conf
只需增加 server 即可。
配置完成,手动进行时间同步:
ntpdate -u 192.168.0.x
查询命令:
ntpdc -n -c lispeers 192.168.0.x
ntpdc -n -c monlist 192.168.0.x
常用的时间服务器地址
http://www.pool.ntp.org/zone/cn
参考链接:
http://blog.csdn.net/wzy_1988/article/details/8629304
http://acooly.iteye.com/blog/1993484
阅读全文
0 0
- NTP服务器搭建与测试
- ntp服务器搭建与使用(ubuntu10.04)
- ntp服务器搭建与修改时区
- NTP服务器的搭建与错误分析
- linux搭建ntp服务器
- NTP服务器搭建
- Ubuntu搭建ntp服务器
- ubuntu搭建NTP服务器
- NTP服务器搭建
- ubuntu搭建ntp服务器
- 搭建ntp时间服务器
- ntp服务器搭建
- windows ntp服务器搭建
- WIN7搭建NTP服务器
- 搭建NTP 服务器
- NTP时间服务器搭建
- CentOS搭建NTP服务器
- NTP时间服务器搭建
- vue2.x实例生命周期
- 数乌龟
- bzoj 1085(A*)
- DataTable 初识
- 判断一棵二叉树是否是平衡二叉树/求一颗二叉树的镜像
- NTP服务器搭建与测试
- 欢迎使用CSDN-markdown编辑器
- mysql str_to_date字符串转换为日期
- Label适应文字大小
- dlib 08 dlib自带demo 基于ResNet34的imagenet图像分类
- spring的@Transactional注解详细用法
- 乐观锁、悲观锁、共享锁和排它锁的简单理解
- iOS Swift Crash的捕获
- 关于xib的连线