ubuntu NTP server 搭建
ubuntu server ntp时间同步服务器安装及使用
一、服务端
1 apt-get install ntp
2 安装后默认启动服务,如果没有启动,启动之。
/etc/init.d/ntp start
3 vi /etc/ntp.conf 修改为如下
restrict default nomodify notrap noquery
restrict 127.0.0.1
restrict 10.91.0.0 mask 255.255.255.0 nomodify
server 0.pool.ntp.org
server 1.pool.ntp.org
server 2.pool.ntp.org
server 127.127.1.0 # local clock
fudge 127.127.1.0 stratum 10
driftfile /var/lib/ntp/drift
broadcastdelay 0.008
keys /etc/ntp/keys
4 重启ntp服务
/etc/init.d/ntp restart
二、客户端
1 使用ntpdate命令,如果不存在这个命令,则先安装apt-get install ntp
sudo /usr/sbin/ntpdate 135.252.151.137 //即使用ip为135.252.151.137的ntp服务器同步时间
2 设置定时同步。
vi /etc/crontab
30 01 * * * /usr/sbin/ntpdate 135.252.151.137
系统便会在每天早上1点30分自动将系统时间同步到ntp服务器的时间。
当然这里crontab的时间是指客户端的时间,同步后等同于ntp服务器的时间。
ubuntu NTP server 搭建的更多相关文章
- Ubuntu server 搭建Git server
Ubuntu server 搭建Git server,git相比svn,最主要就是分布式了,每个客户端用户的本地都是一个版本管理控制器. Ubuntu server 版本为12.04 搭建步骤如下: ...
- Ubuntu Server搭建svn服务以及迁移方法【转】
转自:http://www.linuxidc.com/Linux/2013-05/84693.htm Ubuntu Server搭建svn服务以及迁移方法 采用apache+svn,http访问方式. ...
- Ubuntu server搭建vsftpd小记
Ubuntu server中搭建vsftpd小记 <h1> 在Ubuntu server中安装vsftpd</h1> sudo apt-get install vsftpd & ...
- Ubuntu server 搭建Git server【转】
转自:http://www.cnblogs.com/candle806/p/4064610.html Ubuntu server 搭建Git server,git相比svn,最主要就是分布式了,每个客 ...
- Ubuntu 配置NTP Server
Ubuntu安装NTP Server很简单,分位3步走: 第一步:安装NTP root@cephadmin:~/ceph-cluster# apt-get install ntp Reading pa ...
- (转)ubuntu 12.04搭建Adobe Flash Media Server服务
破解版传送门:http://fms45.cuplayer.com/fms4download.html 福利:1462-5247-1705-7678-8379-5590 下载解压 cd进目录,./ins ...
- 使用阿里云镜像站NTP服务搭建NTP服务器(基于CentOS 7系统)
镜像下载.域名解析.时间同步请点击 阿里云开源镜像站 一.NTP服务器介绍 网络时间协议(Network Time Protocol,NTP)服务器,也就是日常所说的NTP服务器,用来提供同步时间服务 ...
- 创建一个Windows的NTP Server
搭建一个VMware vRealize Suite的时候遇见了不少时间同步的问题, 实验室里网络与外界隔绝, 不能使用公网的NTP服务器, 所以使用文中的方法自己搭建了一个. 蛮好用的. Creati ...
- Ubuntu 14.04搭建简单git服务器
/****************************************************************************** * Ubuntu 14.04搭建简单gi ...
随机推荐
- 原生javascript和jquery实现简单的ajax例子
后台C#代码 public void ProcessRequest(HttpContext context) { context.Response.ContentType = "text/p ...
- Hubilder快捷键
/* tips.txt的内容可以在HBuilder启动封面中显示.你可以自定义一个有趣的启动tips,增加[user]开头的文本内容即可.比如[user]我要减肥! */ 你按照Hello HBui ...
- pytho day6 <正则表达式、常用模块、反射>
本节介绍: 一:正则表达式: 正则表达并不是python 独有的.在各个语言里都有该语法的介绍.正则表达是处理字符串的强大的处理工具.拥有自己的独特的 处理方法.和处理引擎.虽然性能没有python ...
- Jena TDB assembler syntax
1 introduction Assembler is a DSL of Jena to specify something to build, models and dataset, for exa ...
- YHMMR003 农户基本信息的维护程序
*********************************************************************** * Title : * * Application : ...
- Model1
jsp+javabean的开发模式 此处JavaBean也可是封装的业务逻辑 流程: 浏览器端访问jsp,jsp交给Javabean处理,javabean处理后台数据,交还给Jsp
- oracle不能删除,查看引用的外键
例如我在删除scorm_course_info表中的某条数据时,会报已经找到子目录的错误,说明有另外的表B的某列b1外键引用了它,找到表B的b1列,可以通过如下的sql: select b.table ...
- kuangbin_SegTree B (HDU 1754)
跟A题类似 只是把update从增减直接改为赋值 query从求和改为求最大值 其他几乎一样 #include <cstdio> #include <cstring> #inc ...
- 20160113 JS中CheckBox如何控制全选
//判断CheckBoxzong他的点击事件 $("#CheckBoxzong").click(function () { //取出所有class为选中的集合 var query ...
- sql server Datetime格式转换
select CONVERT(varchar, getdate(), 120 ) 2004-09-12 11:06:08 select replace(replace(replace(CONVERT( ...