(一)修改/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服务器进行时间同步的更多相关文章

  1. CentOS搭建内网NTP服务器

      在企业内部网络,不是所有的服务器都可以连接外网,需要搭建一台可以连接外网的服务器用于NTP服务器 安装环境查看 安装ntp yum -y install ntp 修改配置文件 driftfile ...

  2. 1.内网ntp服务器的搭建

    1.拓扑图

  3. 部署NTP服务器进行时间同步

    NTP服务端:linl_S    IP:10.0.0.15 NTP客户端:lin_C    IP:10.0.0.16 NTP服务概述 1.原理 NTP(Network TimeProtocol,网络时 ...

  4. Apache James搭建内网邮件服务器

    Apache James搭建内网邮件服务器 极客521 | 极客521 2014-08-21 148 阅读 java 大概之前两个礼拜的日子,讨论会介绍了关于了.net内网邮件服务器的搭建.所以自己也 ...

  5. VMware虚拟机配置内网电脑能访问

    关键字:内网访问虚拟机.内网访问Linux虚拟机.虚拟机访问外部网络 1.vmware虚拟机网络设置为桥接模式 2.虚拟机配置iP地址,以linux系统为示例. 勾选自动连接,选择手动配置ip,然后配 ...

  6. 外网zabbix-server使用主动模式监控公司内网windows服务器

    外网zabbix-server使用主动模式监控公司内网windows服务器 1.Zabbix Agent active批量调整客户端为主动模式监控将Template OS Windows模板调整为主动 ...

  7. 配置内网DNS实现内部域名解析

    服务器 实战目的: ü 配置内网的DNS服务器实现内网服务器的域名解析. ü 配置内网的DNS服务器减少到Internet的域名解析流量. ü 配置内网的DNS服务器实现Internet上服务器的域名 ...

  8. 云计算之路-试用Azure:搭建自己的内网DNS服务器

    之前我们写过一篇博文谈到Azure内置的内网DNS服务器不能跨Cloud Service,而我们的虚拟机部署场景恰恰需要跨多个Cloud Service,所以目前只能选择用Azure虚拟机搭建自己的内 ...

  9. 内网客户 通过 公网域名/ip 访问内网web服务器 出错

    在一内部局域网中, client  内网地址为 10.0.0.2     web  服务器内网地址为 10.0.0.1    外网地址为  211.6.15.1    域名为  xx.love.com ...

随机推荐

  1. css设置兼容的透明样式

    css设置透明并实现兼容: <style>div{ filter: alpha(opacity=80); -moz-opacity: 0.8; -khtml-opacity: 0.8; o ...

  2. ASP.NET Core 使用 URL Rewrite 中间件实现 HTTP 重定向到 HTTPS

    在传统 ASP.NET 程序中,我们可以通过配置 IIS 的“URL 重写”功能实现将 HTTP 请求重定向为 HTTPS .但是该方法在 ASP.NET Core 应用中不再工作.在 ASP.NET ...

  3. 利用vitual构造类的动态多态性

    虚函数: 在程序运行过程中调用函数名相同的函数而实现不同功能的函数 利用虚函数这一特性,我们可以在公有继承的基类(父类)中定义虚函数,而在它们的派生类(子类)中通过基类指针来实现派生类中同名函数的调用 ...

  4. 关于在windows10中的vmware9.0里面安装的ubuntukylin15.04和windows共享目录的一些反思

    关于在windows10中的vmware9.0里面安装的ubuntukylin15.04和windows共享目录的一些反思 一.遇到的问题      如题目所说,在windows的虚拟机中和windo ...

  5. 震撼功能:逐浪CMS全面支持PWA移动生成意指未来

    Progressive Web App, 简称 PWA,是提升 Web App 的体验的一种新方法,能给用户原生应用的体验. PWA 能做到原生应用的体验不是靠特指某一项技术,而是经过应用一些新技术进 ...

  6. angular aot编译报错 ERROR in ./src/main.ts 解决方法

    昨天打包项目时遇到下图这样的错误: 开始以为了某些模块存在但未使用,折腾一番无果,后来升级angular-cli就搞定了,方法很简单: 1.删掉node_modules 2.更改package.jso ...

  7. 【BZOJ3529】【SDOI2014】 数表

    Time Limit: 10 Sec Memory Limit: 512 MB Description ​ 有一张\(n×m\)的数表,其第i行第j列(\(,1 \le i \leq n,1 \le ...

  8. mysql忘记密码解决的办法

    [很管用]忘记mysql root密码解决办法 1.编辑MySQL配置文件: 首先停止mysql服务, 然后开始编辑mysql配置文件:vi /etc/my.cnf在[mysqld]配置段添加如下一行 ...

  9. windows系统php配置redis

    网上各种找教程各种不行,最后东拼西凑的终于把redis弄出来了. PHP版本:7.1.0: Redis版本:3.2.10: Windows版本:Windows7: 一.Windows下安装Redis ...

  10. NLP︱高级词向量表达(三)——WordRank(简述)

    如果说FastText的词向量在表达句子时候很在行的话,GloVe在多义词方面表现出色,那么wordRank在相似词寻找方面表现地不错. 其是通过Robust Ranking来进行词向量定义. 相关p ...