• linkedu视频
  • 平面设计
  • 电脑入门
  • 操作系统
  • 办公应用
  • 电脑硬件
  • 动画设计
  • 3D设计
  • 网页设计
  • CAD设计
  • 影音处理
  • 数据库
  • 程序设计
  • 认证考试
  • 信息管理
  • 信息安全
菜单
linkedu.com
导航菜单
  • 网页制作
  • 数据库
  • 程序设计
  • 操作系统
  • CMS教程
  • 游戏攻略
  • 脚本语言
  • 平面设计
  • 软件教程
  • 网络安全
  • 电脑知识
  • 服务器
  • 视频教程
  • windows
  • 服务器硬件
  • 服务器运维
  • 云计算
  • 虚拟化
  • IIS教程
  • Linux
  • Apache
  • Ftp
  • DNS
  • Nginx
您的位置:首页 > 服务器 >Linux > centos服务器搭建ntp服务

centos服务器搭建ntp服务

作者:网友 字体:[增加 减小] 来源:互联网

本文主要包含centos搭建ntp服务器,centos ntp服务器,centos 7 ntp服务器,centos6.5 ntp搭建,centos搭建ntp等服务器相关知识,网友希望可以进行参考

centos服务器搭建ntp服务


1、安装前的准备

查看系统上面设置的时区

[root@linux-node1 ~]# cat /etc/sysconfig/clock ZONE="Asia/Shanghai"思想:怎么修改linux主机上面的解决办法:修改时区vim /etc/sysconfig/clockZONE="Asia/Shanghai"UTC=trueARC=false覆盖系统时间文件cp -a /usr/share/zoneinfo/Asia/Shanghai /etc/localtime#2、开始安装ntp服务器采用yum/rpm方式安装yum install ntp -y查看安装是否成功[root@linux-node1 ~]# rpm -qa ntpntp-4.2.6p5-10.el6.centos.1.x86_64

3、开始配置ntp服务器

vim /etc/ntp.conf下面为我修改的/etc/ntp.conf配置文件,下面为大家解释一部分参数的意思:# 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         #默认是拒绝所有的ntp连线restrict -6 default kod nomodify notrap nopeer noquery      #拒绝IP-V6的ntp连线# 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                                          #这里也可以允许单个ip进行对时服务 restrict -6 ::1# Hosts on local network are less restricted.restrict 192.168.17.0 mask 255.255.255.0 nomodify notrap    #允许哪些网段可以使用这个ntp对时服务# 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 iburst#server 1.centos.pool.ntp.org iburst#server 2.centos.pool.ntp.org iburst#server 3.centos.pool.ntp.org iburstserver 2.cn.pool.ntp.org                                    #上层ntp服务器server time.nist.gov preferserver 1.cn.pool.ntp.org 

4、时间同步服务器上面的操作

[root@linux-node1 ~]# /etc/init.d/ntpd restartShutting down ntpd:                                        [  OK  ]Starting ntpd:                                             [  OK  ][root@linux-node1 ~]# ntpq -p     remote           refid      st t when poll reach   delay   offset  jitter==============================================================================+panel.gerardope 116.49.102.213   2 u   24   64    1  211.688  -17.119   0.122*time-d.nist.gov .ACTS.           1 u   22   64    1  348.603    3.607   0.122 static-5-103-12 .GPS.            1 u   22   64    1  311.951  -16.711   0.122解释:*号的意思:表示正在使用的上层NTP+号的意思:表示已经连线成功的,可提供替补的时间同步服务器

5、客户机上面的操作

查看当前时间[root@linux-node2 ~]# dateWed Jan 11 00:08:37 CST 2017更新时间[root@linux-node2 ~]# ntpdate 192.168.17.2323 Jan 20:33:13 ntpdate[27191]: step time server 192.168.17.23 offset 1110147.826055 sec更新时间成功[root@linux-node2 ~]# dateMon Jan 23 20:33:15 CST 2017

6、在Windows服务器上面进行操作

如下图所示:

分享到:QQ空间新浪微博腾讯微博微信百度贴吧QQ好友复制网址打印

您可能想查找下面的文章:

  • centos服务器搭建ntp服务

相关文章

  • centos7安装nginx的两种方法
  • CentOS7下安装MySQL5.7安装与配置(YUM)
  • centos7安装python的MySQLdb模块
  • CentOS安装配置mariadb
  • Ubuntu 14.04下搭建SVN服务器(SVN Server)
  • ubuntu修改terminal终端的主机名的实现方法
  • centos7配置YUM安装DNS服务
  • docker安装redmine步骤
  • centos5下安装mysql5.7.17
  • Ubuntu 14.04 配置vsftpd实现FTP服务器 - 通过FTP连接AWS

文章分类

  • windows
  • 服务器硬件
  • 服务器运维
  • 云计算
  • 虚拟化
  • IIS教程
  • Linux
  • Apache
  • Ftp
  • DNS
  • Nginx

最近更新的内容

    • centos7部署LAMP+xcache
    • HTTP返回状态码中301和302的区别
    • Ubuntu 16.04源码编译安装Nginx 1.10.0
    • CentOS 删除MySQL
    • CentOS6.5安装Nginx1.10.2
    • centos7安装python的MySQLdb模块
    • CentOS7安装配置mysql
    • Centos 配置mailx使用外部smtp发送邮件
    • 详解Linux环境变量配置全攻略
    • Centos 6.5编译安装git 2.9.3

关于我们 - 联系我们 - 免责声明 - 网站地图

©2020-2025 All Rights Reserved. linkedu.com 版权所有