ntp服务

1、检查是否已安装ntp

[[email protected] ~]# rpm -qa ntp

2、安装ntp以及ntpdate

yum -y install ntp ntpdate

3、修改ntp配置文件

vim /etc/ntp.conf

#restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap

restrict 192.168.1.0/24 mask 255.255.255.0 nomodify notrap

加入的这行允许哪些client能够与ntp服务器进行时间同步

server ntp1.jst.mfeed.ad.jp iburst加入此行,多一条时间同步服务器

4、启动ntp服务器

service ntpd start

chkconfig ntpd on

[[email protected] tmp]# ntpq -p

remote           refid      st t when poll reach   delay   offset  jitter

==============================================================================

*dns1.synet.edu. 202.118.1.47     2 u   78   64  376   38.169   38.259  33.424

+ntp1.jst.mfeed. 133.243.236.17   2 u   67   64  377   37.098   32.521  19.811

client:

只需要安装ntpdate即可

操作:

ntpdate 192.168.1.11

参考:https://www.server-world.info/en/note?os=CentOS_6&p=ntp&f=1

时间: 2024-08-12 07:04:04

ntp服务的相关文章

NTP服务及时间同步(CentOS6.x)(转载)

今有一小型项目,完全自主弄,原来以为很简单的NTP服务,我给折腾了2个多小时才整撑头(以前都是运维搞,没太注意,所以这技术的东西,在简单都需要亲尝啊),这里记录为以后别再浪费时间. 目标环境,5台linux centos 6.3, 一台作为NTPD服务与外部公共NTP服务同步时间,同时作为内网的NTPD服务器,其他机器与这台服务做时间同步.  服务器IP 角色   说明 同步方式  192.168.1.135   NTPD服务 1.负责与外部公共NTPD服务同步标准时间 2.作为内外网络的NTP

时间同步ntp服务的安装与配置

通过ntp服务实现时间同步. 1:首先搭建本地yum源见网址(http://www.cnblogs.com/zj21/p/6223462.html) 2:先安装ntp服务 [[email protected] ~]# yum install ntp -y 3:修改ntp的配置文件 [[email protected] ~]# vi /etc/ntp.conf # For more information about this file, see the man pages# ntp.conf(5

cetnos 7 ntp服务的安装与配置

首先需要搭建yum本地仓库 http://www.cnblogs.com/jw35/p/5967677.html   #搭建yum仓库方法 yum install ntp -y        #安装ntp服务 修改ntp配置文件 vi /etc/ntp.conf    #编辑配置文件 把 server 0.centos.pool.ntp.org iburstserver 1.centos.pool.ntp.org iburstserver 2.centos.pool.ntp.org iburst

Linux学习日志day2 part0——搭建NTP服务进行时间管理

简单的一手操作 机器的系统时间同步非常重要,不然可能要出大事. 实现: yum -y install ntp 给各台机器都装上NTP服务 vim /etc/ntp.conf 用#注释掉系统默认的服务器,加入自定义服务器 server 主机名/域名 iburst 注意末尾的iburst 主机与asia.pool.ntp.org进行同步,其他的机器与主机同步,这样就能保证每台机子的时间都是同步的. systemctl start ntpd systemctl enable ntpd 大功告成 笔记:

Mac OS X NTP 服务开启与关闭

开启ntp服务: 如果系统意外停止ntp服务可以使用如下命令开启,然后使用netstat -nl | grep "\.123"命令查看是否已经监听udp 123端口了. sudo ntpd 手动同步时间: ntpdate time.nist.gov 关闭ntp服务: MacOS X使用launchctl管理系统服务的并且launchctl会检测服务状态,如果服务停止会自动重启该服务: 使用如下命令会停止ntpd服务,但大概5秒钟后会自动重启该服务: sudo launchctl sto

配置Linux 11G R2 RAC NTP服务

安装Oracle 11g RAC时,我们需要配置ntp服务.在使用虚拟机的情况下对于时钟同步方式的配置有很多种方式,可以使用vmware自带的时钟同步功能,也可以直接将本地的一个节点用作时间服务器.本文介绍直接配置ntp方式的时钟服务器. [python] view plain copy print? 1.查看两节点的hosts配置 [[email protected] ~]# cat /etc/hosts # Do not remove the following line, or vario

ntp 服务/客户端配置详解

本次实验使用2台rhel 6.3,其中192.168.1.131为服务端:192.168.1.132为客户端.服务器端配置只允许192.168.1.0网段连接服务器进行时间同步 1.安装ntp服务(客户端和服务端) # yum -y install ntp # rpm -qa | grep ntp fontpackages-filesystem-1.41-1.1.el6.noarch ntpdate-4.2.6p5-5.el6.centos.4.x86_64 ntp-4.2.6p5-5.el6.

NTP服务的搭建

NTP服务的搭建 1.     准备环境 服务器系统为redhat 6.4 两块网卡eth0(连接外网),eth1(连接内网ip:192.168.1.1). 现在搭建一台时间同步服务器,服务器和公网的NTP Server 时间同步,然后负责同步局域网的时间 2.     安装NTP软件包 yum install ntp –y 3.     编辑配置文件/etc/ntp.conf (1)NTP服务的主要配置文件是/etc/ntp.conf.其中已经有了一些默认设置.如下图所示: 含义注释: res

ntp服务的细节

在linux里设置NTP服务并不难,但是NTP本身确是一个很复杂的协议. 你都了解细节么? 1. 时间和时区 date命令可显示时间与市区 [[email protected]_PV1_DB ~]# date Tue Feb  7 16:32:16 CST 2017 [[email protected]_PV1_DB ~]# cat /etc/sysconfig/clock ZONE="Asia/Shanghai" CST=true 在地球环绕太阳旋转的24个小时中,世界各地日出日落的

配置ntp服务

配置ntp服务(hadoop搭建可参考) 一:修改选定的服务器的本地时间 date -s '2016-10-07 16:29:30' +'%F %T' //需要设置的时间 二:修改后将时间写入到硬件时钟,确保重启有效 hwclock -w 三:安装并开启ntp服务 四:开启自动开启ntp服务开机启) chkconfig ntpd on //开机自动开启ntp服务 chkconfig --list ntpd //查看ntp状态 ntpd           0:关闭 1:关闭 2:启用 3:启用