centos7.2 配置内网ntp服务器进行时间同步
(一)修改/etc/ntp.conf 配置文件,注意红色部分,其他部分不需要改
####################################################################
# For more information about this file, see the man pages
# ntp.conf(5), ntp_acc(5), ntp_auth(5), ntp_clock(5), ntp_misc(5), ntp_mon(5).
driftfile /var/lib/ntp/drift
# Permit time synchronization with our time source, but do not
# permit the source to query or modify the service on this system.
#restrict default nomodify notrap nopeer noquery
restrict default ignore
# 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 ::1
# Hosts on local network are less restricted.
restrict 192.168.2.0 mask 255.255.255.0 nomodify notrap
# Use public servers from the pool.ntp.org project.
# Please consider joining the pool (http://www.pool.ntp.org/join.html).
server 127.127.1.0
fudge 127.127.1.0 stratum 10
#broadcast 192.168.1.255 autokey # broadcast server
#broadcastclient # broadcast client
#broadcast 224.0.1.1 autokey # multicast server
#multicastclient 224.0.1.1 # multicast client
#manycastserver 239.255.254.254 # manycast server
#manycastclient 239.255.254.254 autokey # manycast client
# Enable public key cryptography.
#crypto
includefile /etc/ntp/crypto/pw
# Key file containing the keys and key identifiers used when operating
# with symmetric key cryptography.
keys /etc/ntp/keys
# Specify the key identifiers which are trusted.
#trustedkey 4 8 42
# Specify the key identifier to use with the ntpdc utility.
#requestkey 8
# Specify the key identifier to use with the ntpq utility.
#controlkey 8
# Enable writing of statistics records.
#statistics clockstats cryptostats loopstats peerstats
# Disable the monitoring facility to prevent amplification attacks using ntpdc
# monlist command when default restrict does not include the noquery flag. See
# CVE-2013-5211 for more details.
# Note: Monitoring will not be disabled with the limited restriction flag.
disable monitor
#server time.windows.com
#server s2m.time.edu.cn
#server 0.asia.pool.ntp.org
#server 1.asia.pool.ntp.org
#server 2.asia.pool.ntp.org
#server 3.asia.pool.ntp.org
#server 127.127.1.0 iburst local clock
#restrict 192.168.2.1 mask 255.255.255.0 nomodify
###############################################################################
(二)启动service ntpd restart
chkconfig --level 345 ntpd on --添加启动
测试
ntpdate 192.168.2.130 -地址为 ntp服务器地址

(三)客户端配置同步
crontab -e
00 */1 * * * /usr/sbin/ntpdate 192.168.2.130;/sbin/hwclock -w
centos7.2 配置内网ntp服务器进行时间同步的更多相关文章
- CentOS搭建内网NTP服务器
在企业内部网络,不是所有的服务器都可以连接外网,需要搭建一台可以连接外网的服务器用于NTP服务器 安装环境查看 安装ntp yum -y install ntp 修改配置文件 driftfile ...
- 1.内网ntp服务器的搭建
1.拓扑图
- 部署NTP服务器进行时间同步
NTP服务端:linl_S IP:10.0.0.15 NTP客户端:lin_C IP:10.0.0.16 NTP服务概述 1.原理 NTP(Network TimeProtocol,网络时 ...
- Apache James搭建内网邮件服务器
Apache James搭建内网邮件服务器 极客521 | 极客521 2014-08-21 148 阅读 java 大概之前两个礼拜的日子,讨论会介绍了关于了.net内网邮件服务器的搭建.所以自己也 ...
- VMware虚拟机配置内网电脑能访问
关键字:内网访问虚拟机.内网访问Linux虚拟机.虚拟机访问外部网络 1.vmware虚拟机网络设置为桥接模式 2.虚拟机配置iP地址,以linux系统为示例. 勾选自动连接,选择手动配置ip,然后配 ...
- 外网zabbix-server使用主动模式监控公司内网windows服务器
外网zabbix-server使用主动模式监控公司内网windows服务器 1.Zabbix Agent active批量调整客户端为主动模式监控将Template OS Windows模板调整为主动 ...
- 配置内网DNS实现内部域名解析
服务器 实战目的: ü 配置内网的DNS服务器实现内网服务器的域名解析. ü 配置内网的DNS服务器减少到Internet的域名解析流量. ü 配置内网的DNS服务器实现Internet上服务器的域名 ...
- 云计算之路-试用Azure:搭建自己的内网DNS服务器
之前我们写过一篇博文谈到Azure内置的内网DNS服务器不能跨Cloud Service,而我们的虚拟机部署场景恰恰需要跨多个Cloud Service,所以目前只能选择用Azure虚拟机搭建自己的内 ...
- 内网客户 通过 公网域名/ip 访问内网web服务器 出错
在一内部局域网中, client 内网地址为 10.0.0.2 web 服务器内网地址为 10.0.0.1 外网地址为 211.6.15.1 域名为 xx.love.com ...
随机推荐
- 高通ASOC中的codec驱动
ASOC的出现是为了让codec独立于CPU,减少和CPU之间的耦合,这样同一个codec驱动就无需修改就可以匹配任何一款平台. 在Machine中已经知道,snd_soc_dai_link结构就指明 ...
- Spring boot 整合mybatis
第一步:创建maven项目并添加spring boot依赖: <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns ...
- uva 1151最小生成树
先求一次最小生成树,可以排除n*(n*1)/2-(n-1)条边,每次利用二进制法枚举套餐的选择,套餐中的点直接处理,如果两个套餐有公共点直接合并,他们一定连通,然后枚举第一步最小生成树得到的n-1条边 ...
- WinSock WSAEventSelect 模型总结
前言 本文配套代码:https://github.com/TTGuoying/WSAEventSelect-model 由于篇幅原因,本文假设你已经熟悉了利用Socket进行TCP/IP编程的基本原理 ...
- AWS EC2 通过Linux终端:使用ssh连接到Linux实例
AWS的ubuntu主机登录用户是ubuntu 只能通过秘钥的方式登录 如果在linux终端通过ssh远程登录步骤如下: 假如申请EC2主机的时候下载的key名称叫my-key.pem,并保存在本地l ...
- yum仓库详细解读
Yum:Yellowdog Updater,Modified的简称,起初由yellow dog发行版的开发者Terra Soft研发,用Python编写,后经杜克大学的Linux@Duke开发团队进行 ...
- HttpURLConnection 411错误解决
1.问题描述 Java HttpURLConnection类发送Http请求链接外网返回ResponseCode为411,对方为.NET服务器,网上查明原因可能来自以下: 1.可能是没有传http中的 ...
- vxWorks下intel82567v3网卡驱动的更新
/* 82567 devicesID */ #define INTEL_DEVICEID_82567LF 0x10BF#define INTEL_DEVICEID_82567 ...
- Linux查看非root运行的进程
Linux查看非root运行的进程 youhaidong@youhaidong-ThinkPad-Edge-E545:~$ ps -U root -u root -N PID TTY TIME CMD ...
- Linux显示目前登入系统的用户信息
Linux显示目前登入系统的用户信息 youhaidong@youhaidong-ThinkPad-Edge-E545:~$ who youhaidong :0 2015-01-26 22:43 (: ...