CentOS 6.3下NTP服务安装和配置
测试环境:
NTPserver 192.168.1.252
NTPclient 192.168.1.251
准备工作:
关闭selinux:
vi /etc/selinux/config
SELINUX=disabled
关闭iptables:
service iptables stop
chkconfig iptables off
一.安装NTP软件包:
yum -y install ntp /*yum安装NTP服务*/
chkconfig --add ntpd /*添加NTP*/
chkconfig ntpd on /*开机自启动NTP*/
二.修改NTP配置文件:
vi /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
restrict default ignore 设置默认策略为拒绝所有访问方式的请求
# Permit time synchronization with our time source, but do not
# permit the source to query or modify the service on this system.
restrict default kod nomodify notrap nopeer noquery
restrict -6 default kod nomodify notrap nopeer noquery
# 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 -6 ::1
# Hosts on local network are less restricted.
restrict 192.168.1.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 0.CentOS.pool.ntp.org
server 1.centos.pool.ntp.org 设置同步服务器
server 2.centos.pool.ntp.org
#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
restrict 0.centos.pool.ntp.org nomodify notrap noquery
restrict 1.centos.pool.ntp.org nomodify notrap noquery 允许与上层服务器同步时间
restrict 2.centos.pool.ntp.org nomodify notrap noquery
# Undisciplined Local Clock. This is a fake driver intended for backup
# and when no outside source of synchronized time is available.
server 127.127.1.0 # local clock
fudge 127.127.1.0 stratum 10 外界同步源无法联系时,使用本地时间为同步服务
# 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 loops
***************************************************************
CentOS 6.3下NTP服务安装和配置的更多相关文章
- CentOS 6.5 下HeartBeat的安装与配置
CentOS 6.5 下HeartBeat的安装与配置 参考网站: http://wenku.baidu.com/link?url=BvqJatdx1m12PLil-7YA1zkM0yUOEO8OnN ...
- CentOS7下NFS服务安装及配置固定端口
CentOS7下NFS服务安装及配置 系统环境:CentOS Linux release 7.4.1708 (Core) 3.10.0-693.el7.x86_64 软件版本:nfs-utils-1. ...
- CentOS 6.6下JDK1.7安装与配置(Linux)经典入门详解案例
最近用的linux较多,在网站找了一些关于linux环境下jdk安装的教程,过程是有的但是好多细节都没有表现出来,所以我花了点时间总结了一下,希望对大家都有帮助... CentOS下JDK1.7安装与 ...
- CentOS 7下Samba服务安装与配置详解
1. Samba简介 Samba是在Linux和UNIX系统上实现SMB协议的一个免费软件,由服务器及客户端程序构成.SMB(Server Messages Block,信息服务块)是一种在局域网上共 ...
- CentOS 7.5下KVM的安装与配置
由于没有物理机可用,在自己的VMware Workstation中CentOS 7.5下搭建完成. 首先查看VMware Workstation是否支持虚拟化,把红框内打钩即可. 虚拟化开启并安装Ce ...
- CentOS 6.3下PostgreSQL 的安装与配置
一.简介 PostgreSQL 是一种非常复杂的对象-关系型数据库管理系统(ORDBMS),也是目前功能最强大,特性最丰富和最复杂的自由软件数据库系统.有些特性甚至连商业数据库都不具备.这个起源于伯克 ...
- Linux——CentOS 6.3下PostgreSQL 的安装与配置
一.简介 PostgreSQL 是一种非常复杂的对象-关系型数据库管理系统(ORDBMS),也是目前功能最强大,特性最丰富和最复杂的自由软件数据库系统.有些特性甚至连商业数据库 都不具备.这个起源于伯 ...
- linux下informatica服务安装和配置
本文中将会用infa简称代替informatica 1.安装前准备 介质名称 版本信息 描述 Informatica Powercenter 9.5.1 for Linux 64 bit 必须 Jav ...
- CentOS7下NFS服务安装及配置
系统环境:CentOS Linux release 7.4.1708 (Core) 3.10.0-693.el7.x86_64 软件版本:nfs-utils-1.3.0-0.48.el7_4.x86_ ...
随机推荐
- 字符串匹配算法之KMP
字符串匹配是计算机的基本任务之一. 举例来说,有一个字符串"BBC ABCDAB ABCDABCDABDE",我想知道,里面是否包含另一个字符串"ABCDABD" ...
- iOS打上线包或者测试包详细流程
首先登陆苹果官方开发者账号:http://developer.apple.com 进入到如下界面 之后进入如下界面:点击第二项创建证书 整个流程如下图4步 然后按照如下图片进行配置即可 接下来去创建C ...
- 东芝MIPI解码TC358746AXBG和OV6211使用及配置
Camera Sensor常见的接口类型: 1.有并口信号(D0~D7.PCLK.HSYNC.VSYNC),一般的处理器有DCMI接口,如ST32F207x系列,直接相连就可以使用. 2.MIPI接口 ...
- Java語言
Java编程语言是个简单.完全面向对象.分布式.解释性.健壮.安全与系统无关.可移植.高性能.多线程和动态的编程语言. Java可以撰写跨平台应用软件,是有Sun Microsystems公司于199 ...
- hdu_3518_Boring counting(后缀数组)
题目链接:hdu_3518_Boring counting 题意: 给你一个字符串,让你找不重叠且出现大于1次以上的字串个数 题解: 后缀数组height数组的应用,我们枚举字串的长度,然后将heig ...
- TransactionScope的使用
本文导读:在实际开发工作中,执行一个事件,然后调用另一接口插入数据,如果处理逻辑出现异常,那么之前插入的数据将成为垃圾数据,我们所希望的是能够在整个这个方法定义为一个事务,TransactionSco ...
- jni中的参数含义
#include <jni.h> JNIEXPORT jstring JNICALL Java_com_example_hellojni_MainActivity_helloFromC ( ...
- js获取后台json数据显示在jsp页面元素
jsp id <font size=2 >Today:</font> <font id ="todaytotal" size=2 color=&quo ...
- .Net日期处理之格式化
一.默认格式 2015/9/3 9:04:31 二.格式2 2015年9月3日 9:28:51 三.格式3 2015年9月3日 9:31 四.格式4 2015/9/3 9:39:01 五.格式5 20 ...
- __declspec(dllexport) 和 __declspec(dllimport)的作用
operatordll.h #include <iostream> #ifndef _WIN32 #define DLL_EXPORT#else #ifdef OPERATORDLL_EX ...