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 ...
随机推荐
- 计算机网络(2)-----ARP协议
ARP协议(Address Resolution Protocol) 概念 地址解析协议,即ARP(Address Resolution Protocol),是根据IP地址获取物理地址的一个TCP/I ...
- 搭建mysql5.626及如何去官网下载历史版本数据库
MySQL官网下载历史版本 网上搜索MySQL官网 2 查询所有的归档文件 点击进入服务器列表 列表中默认只有Windows 版本的,可选择其它版本,但无法进行查询 查看网页元素 发现 ...
- hdu 1057 (simulation, use sentinel to avoid boudary testing, use swap trick to avoid extra copy.) 分类: hdoj 2015-06-19 11:58 25人阅读 评论(0) 收藏
use sentinel to avoid boudary testing, use swap trick to avoid extra copy. original version #include ...
- IIS+PHP配置一次成功无错误版
1.首先去PHP官网下载php的压缩包(.zip),由于web服务器是IIS所以尽量使用线程不安全版本的,我下载的是: VC11 x86 Non Thread Safe (2015-May-14 18 ...
- STL模板之_map,stack(计算矩阵相乘的次数)
#include <map>#include <stack>#include <iostream>using namespace std; struct Node ...
- SQLite简单使用说明
System.Data.SQLite.dll下载地址 http://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki 选择. ...
- warning C4305: “=”: 从“int”到“unsigned char”截断解决方法[zz]
在控制台程序中定义: float x; x=22.333; 编译会出现 warning C4305: “初始化”: 从“double”到“float”截断 系统默认此浮点数是22.333是double ...
- mysql插入数据后返回自增ID的方法
mysql和oracle插入的时候有一个很大的区别是,oracle支持序列做id,mysql本身有一个列可以做自增长字段,mysql在插入一条数据后,如何能获得到这个自增id的值呢? 方法一是使用la ...
- M6: 使用摄像头(CameraCaptureUI)
本小节介绍UWP中摄像头的使用,使用CameraCaptureUI来拍照,不仅能够获得图像,还能够对图像进行剪裁 (目前Mobile设备还上不支持). 在本例中, 单击Camera按钮调用摄像头来拍摄 ...
- 线程和NSThread 、 NSOperation
1 使用NSThread实现打地鼠 1.1 问题 NSThread是ios提供的轻量级的多线程解决方案,但是需要自己管理线程的生命周期.线程同步等.本案例使用NSThread实现一个打地鼠的小游戏,在 ...