【ntp】centos7下ntp服务器设置
安装ntp
rpm -q ntp
yum -y install ntp
修改配置文件:/etc/ntp.conf
restrict default kod nomodify notrap nopeer noqueryrestrict -6 default kod nomodify notrap nopeer noqueryrestrict 127.0.0.1restrict -6 ::1fudge 127.127.1.0 stratum 10driftfile /var/lib/ntp/driftkeys /etc/ntp/keyslogfile /var/log/ntp.logincludefile /etc/ntp/crypto/pwserver 128.199.84.169

设置ntpd为系统服务,并开机自启动
systemctl enable ntpdsystemctl restart ntpd
测试Ntpd服务
1. 修改系统时间
date -s "2016-03-09 07:00:00"

2. 使用tcpdump抓包测试
tcpdump -i eth0 -s 0 -vvvvv udp port 123

3. 重启ntpd服务,查看时间同步结果
systemctl restart ntpd


手动同步时间
其他命令
【ntp】centos7下ntp服务器设置的更多相关文章
- centos7下SVN服务器如何搭建
Centos7 搭建svn服务器 linux(centos)下SVN服务器如何搭建?说到SVN服务器,想必大家都知道,可以是在LINUX下如何搭建SVN服务器呢?那么今天给大家分享一下linux(ce ...
- Linux centos7 下 svn 服务器搭建
摘自:https://www.cnblogs.com/mymelon/p/5483215.html 鉴于在搭建时,参考网上很多资料,网上资料在有用的同时,也坑了很多人 本文的目的,也就是想让后继之人在 ...
- Centos7下git服务器及gogs部署
1.安装git # yum install -y git 2.创建git用户及组 # groupadd git # adduser git -g git # mkdir /home/git # mkd ...
- CentOS7下,防火墙设置
CentOS中防火墙程序主要是firewall和iptables两种. CentOS7中firewall服务已经默认安装好了,而iptables服务需要自己用yum install iptabes- ...
- centos7下SVN服务器搭建
1,安装 yum install subversion 2,输入rpm -ql subversion查看安装位置 3,创建svn版本库目录 mkdir -p /var/svn/svnrepos 4,创 ...
- 浅谈Linux(Centos7.4)环境下NTP服务器的构建
一.软件环境 1.操作系统版本 [root@Geeklp201 etc]# cat /etc/redhat-release CentOS Linux release 7.4.1708 (Core ...
- centos7 搭建ntp时钟服务器
服务器 : 192.168.137.3 客户机: 192.168.137.6 1. 服务器端 centos7下首先确认服务器的防火墙.selinux关闭状态 # cat /etc/redhat-re ...
- centos7搭建ntp时间同步服务器chrony服务
centos7搭建ntp时间同步服务器chrony服务 前言: 在centos6的时候我们基本使用的是ntp服务用来做时间同步,但是在centos7后推荐是chrony作为时间同步器的服务端使用, ...
- centos6 & centos7搭建ntp服务器
原理 NTP(Network TimeProtocol,网络时间协议)是用来使计算机时间同步的一种协议.它可以使计算机对其服务器或时钟源做同步化,它可以提供高精准度的时间校正(LAN上与标准间差小于1 ...
随机推荐
- js实现简单易用的上下无缝滚动效果
<!doctype html> <html> <head> <meta charset="utf-8"> <title> ...
- POJ 3660 Cow Contest
题目链接:http://poj.org/problem?id=3660 Cow Contest Time Limit: 1000MS Memory Limit: 65536K Total Subm ...
- UVa 12100打印队列(队列)
原题链接:https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem ...
- 基于Spring MVC的Web应用开发(三) - Resources
基于Spring MVC的Web应用开发(3) - Resources 上一篇介绍了在基于Spring MVC的Web项目中加入日志,本文介绍Spring MVC如何处理资源文件. 注意到本项目的we ...
- Httptunnel教程
hts --forward-port localhost:22 80 htc -F 6789 192.168.10.1:80
- spring源码学习之:spring容器的applicationContext启动过程
Spring 容器像一台构造精妙的机器,我们通过配置文件向机器传达控制信息,机器就能够按照设定的模式进行工作.如果我们将Spring容器比喻为一辆汽车,可以将 BeanFactory看成汽车的发动机, ...
- ps图层混合模式
溶解: ------------- 变暗:当使用该模式时,图像中的颜色或物体,总是其中颜色比较深的覆盖比较浅的,而数值相同或更深的像素不受影响.但记住,是上层针对下层,也就是说要有两个图层才有用 正片 ...
- JVM ,JIT ,GC RUNTIME 解析
Java Class字节码知识点回顾 https://yq.aliyun.com/articles/2358?spm=5176.8067842.tagmain.105.fQdvH3 JVM Class ...
- MFC应用程序框架入门(转)
1 MFC概述 顾名思意,MFC应用程序框架是以MFC作为框架基础的,以此程序框架模式搭建起来的应用程序在程序结构组织上是完全不同于以前的Win32 SDK编程方式的.自20世纪90年代初问世以来,M ...
- Linux-Nginx之sendfile与上下文切换
今天在看nginx thread pool的时候,频繁的看到sendfile,其实以前也经常看到sendfile,只是我平时选择性的忽视而已... 先说下sendfile,明天在好好聊下nginx 线 ...
