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 ...
随机推荐
- 940A Points on the line
传送门 题目大意 给你n和d还有n个数,计算最少删除几个点可以是最大点与最小点之差小于等于d 分析 先对所有点排序,枚举每一个点ai到ai+d中有几个点,答案即n-其中最大的值 代码 #include ...
- ubuntu安装nginx和设置网站https访问
安装nginx 在控制台 输入 sudo apt-get install nginx 等待安装成功之后.可以打开浏览器.输入你的域名或者ip地址会出现"Welcome to nginx!&q ...
- 几种优化ajax的执行速度的方法
1.尽量使用局部的变量,而不使用全局变量: 2.优化for循环 3.尽量少用eval,每次使用eval都需要消耗大量的时间: 4.将DOM节点放在文档上. 5.尽量减少点好(.)操作符号的使用
- js获取某个日期所在周周一的日期
第一次写,做个小笔记. 第一步:获取该日期的星期数: 第二步:在该日期上减去他的星期数再减1,(注:星期日获取到的星期数是0): 下面是具体代码: function GetMonday(dd) { v ...
- 危化品速查APP--Android Project
开发环境 Android studio 2.3.1 功能描述 集成多种查询方式,查看本地数据库中危险化学品的信息: 按照中文拼音和英文首字母,对化学品进行查询: 按照UN号或者CAS号查询相应的化学品 ...
- nyoj358 取石子(五) 斐波那契博弈
我写代码找的规律:如果这个n是斐波那契数,那么它是P态,如2,3,5,8..... 找规律的代码: #include <cstdio> #include <cmath> #in ...
- git 命令和使用场景总结
资料地址:https://www.liaoxuefeng.com/wiki/0013739516305929606dd18361248578c67b8067c8c017b000 http://w ...
- TCP/IP三次握手四次挥手
本文通过图来梳理TCP-IP协议相关知识.TCP通信过程包括三个步骤:建立TCP连接通道,传输数据,断开TCP连接通道.如图所示,给出了TCP通信过程的示意图. TCP 三次握手四次挥手 主要包括三部 ...
- scrapy学习总结
1.为了配合XPath,Scrapy除了提供了 Selector 之外,还提供了方法来避免每次从response中提取数据时生成selector的麻烦 Selector有四个基本的方法(点击相应的方法 ...
- Git创建本地分支并推送到远程github仓库