【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 ...
随机推荐
- JSONP解决ajax跨域问题
在A域名下,用ajax请求B域名下的请求,会报类似这样的错误:No 'Access-Control-Allow-Origin' header is present on the requested r ...
- 十五个最常用Linux命令行 - imsoft.cnblogs
众多Linux管理员在使用Linux的时候会经常使用到很多Linux命令行,其中有绝大部分不是经常使用到的.在本文中主要为大家总结了经常使用的十五个最常用Linux命令行,希望对刚刚接触Linux命令 ...
- android listview去掉分割线
1:android listview去掉分割线 1>设置android:divider="@null" 2>android:divider="#0000000 ...
- 转:db2 iptables相关用法(2)
Centos 6 iptables 配置 Ben 2011/12/24 [root@localhost ben.liu]# service iptables status Table: filter ...
- 批量kill相关所有进程
首先,用ps查看进程,方法如下: $ ps -ef …… smx 1822 1 0 11:38 ? 00:00:49 gnome-terminal smx ...
- 【转】非常适用的Sourceinsight插件,提高效率事半功倍
原文网址:http://www.cnblogs.com/wangqiguo/p/3713211.html 一直使用sourceinsight编辑C/C++代码,sourceinsight是一个非常好用 ...
- Measuring the amount of writes in InnoDB redo logs
Choosing a good InnoDB log file size is key to InnoDB write performance. This can be done by measuri ...
- 如何给EDIUS添加区域性马赛克
我们平时观看视频时会经常看到画面上的一部分信息被用马赛克来遮盖,那在使用EDIUS制作编辑视频时,这一效果要如何做到呢?下面,小编就来给大家讲讲如何给EDIUS区域添加马赛克吧. 1.首先在特效面板中 ...
- API、ABI区别
http://blog.csdn.net/xinghun_4/article/details/7905298 应用程序二进制接口(ABI-Application Binary Interface)定义 ...
- wikioi 1973 Fibonacci数列【输出第N项的值】
/*===================================== 1978 Fibonacci数列 3 题目描述 Description 斐波纳契数列是这样的数列: f1 = 1 f2 ...
