Linux-NTP-Server+Client
GMT/UTC/CST;
/etc/localtime,/usr/share/zoneinfo/*时区文件,/etc/profile加TZ变量;
硬件时间RTC,系统时间;date,hwclock,tzselect;
/usr/share/zoneinfo/Asia
zdump sichuan 查看对于每个time zone当前的时间
# hwclock --set --date="mm/dd/yy hh:mm:ss" 设置硬件时间我们可以开机的时候在BIOS里设定.也可以用hwclock命令
# date -s "dd/mm/yyyy hh:mm:ss" 修改系统时间用date命令就最简单了
1.设置时区
GMT:格林威治时区
UTC:世界协调时区
CST:中国标准时区
cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
如果时区不对,删除、/etc/localtime,再配置
tzselect 》5) Asia--9) China--1) Beijing Time
2.Command
# hwclock --set --date="mm/dd/yy hh:mm:ss"
# date -s "dd/mm/yyyy hh:mm:ss"
# hwclock --systohc
# hwclock --hctosys
3.NTP SERVER
rpm -qa | grep ntp
yum -y ntpd install
http://www.pool.ntp.org
SERVER = cn.pool.ntp.org
ntpdate cn.pool.ntp.org
/etc/ntp.conf
#server cn.pool.ntp.org
#fudge 127.127.1.0 stratum 10 stratum
#driftfile /var/lib/ntp/ntp.drift
#restrict default kod nomodify notrap nopeer noquery 默认的client拒绝所有的操作
#restrict 127.0.0.1 允许本机地址一切
#restrict 192.168.1.0 mask 255.255.255.0 nomodify 允许局域网内所有client连接到这台服务器同步时间.
# /etc/init.d/ntpd start
# chkconfig --level 35 ntpd on
# vi /etc/sysconfig/ntpd
SYNC_HWCLOCK=yes
watch ntpq -p
4.NTP client的设置
/etc/ntp.conf
server 192.168.1.105
LINUX客户端使用
ntpdate 92.168.1.105
# hwclock --systohc
如果同步不成功检查:iptables need disable 或 tcp 123
Linux-NTP-Server+Client的更多相关文章
- win2003系统同步Linux ntp server批处理
最后更新时间: 2018/12/15 一般windows配置时间服务器,只需要在windows系统右下角,点时间,里面配置好对应NTP服务器地址就行, 至多再修改一下注册表 HKEY_LOCAL_MA ...
- L01-RHEL6.5中部署NTP(ntp server + client)
RHEL6.5集群中部署NTP NTP全称为Network Time Protocol,即网络时间协议.一般在Linux系统中用来同步集群中不同机器的时间. 本文描述的ntp服务部署框架如下图示 如上 ...
- linux+udp+server+client
一.客户端 #include<sys/types.h> #include<sys/socket.h> #include<netinet/in.h> #include ...
- linux 下使rdate命令支持ipv6 ntp server 同步时间
如果使用linux 下,busybox自带的rdate命令 去ipv6 的ntp server 同步时间的话,会提示invalid argument :无效参数. 那么现在下载rdate的源码并对其进 ...
- Linux NTP服务器的搭建及client自动更新时间
Network Time Protocol(NTP)是用来使计算机时间同步化的一种协议,它可以使计算机对其服务器或时钟源(如石英钟,GPS等等)做同步化,它可以提供高精准度的时间校正(LAN上与标准间 ...
- linux c server and client 简单的通信
server.c #include <stdlib.h> #include <stdio.h> #include <errno.h> #include <st ...
- Linux 上配置 NTP SERVER
在CENTOS 6.2上面安装配置NTP SERVER 安装NTP:yum install ntp 配置时间源vi /etc/ntp.confserver 210.72.145.44server nt ...
- linux ntp时间同步
linux ntp时间同步 一.搭建时间同步服务器1.编译安装ntp serverrpm -qa | grep ntp若没有找到,则说明没有安装ntp包,从光盘上找到ntp包,使用rpm -Uvh n ...
- linux ntp时间服务器配置
Network Time Protocol (NTP) 也是RHCE新增的考试要求. 学习的时候也顺便复习了一下如何设置Linux的时间,现在拿出来和大家分享 设置NTP服务器不难但是NTP本身是一个 ...
- linux NTP配置
时间是由计算机内的石英晶体振荡电路以:NetworkTimeProtocol(NTP):通常情况下,时间同步是按以下步骤进行的::(1):NTP客 户端向NTP服务器发出一个时间请:(2):当服务器接 ...
随机推荐
- Visual Studio 2010 单元测试
转载出处:http://blog.csdn.net/tjvictor/article/details/6175362
- 互联网保险O2O平台微服务架构设计(转)
非常感谢http://www.cnblogs.com/skyblog/p/5044486.html 关于架构,笔者认为并不是越复杂越好,而是相反,简单就是硬道理也提现在这里.这也是微服务能够流行的原因 ...
- c语言 如何判断是不是 可显字符
c语言 如何判断是不是 可显字符int isprint(int c)若可显示返回1,否则0:要包含头文件ctype.h
- Hashing filters for very fast massive filtering
If you have a need for thousands of rules, for example if you have a lot of clients or computers, al ...
- OpenFlow Switch学习笔记(二)——OpenFlow Ports
OpenFlow Ports是OpenFlow Switch与剩余网络之间传递Packet的网络接口.OpenFlow Switches之间通过OpenFlow Ports彼此相互逻辑连接.一个Ope ...
- Core Java Volume I — 4.6. Object Construction
4.6. Object ConstructionYou have seen how to write simple constructors that define the initial state ...
- jquery easyui datebox 时间控件默认显示当前日期的实现方法
jquery easyui datebox 时间控件默认显示当前日期的实现方法 直接class easyui-datebox后添加一个value="true"就可以
- shell 脚本实战笔记(1)--source/fork/exec的区别
在linux shell编程中, 随着脚本处理规模的变大, 会嵌套调用子进程. 但父进程以不同的方式调用子进程, 其结果和背后的机制不尽相同.这边就简单描述下source/fork/exec调用子进程 ...
- 104. Maximum Depth of Binary Tree
Given a binary tree, find its maximum depth. The maximum depth is the number of nodes along the long ...
- ZOJ 1076 Gene Assembly
原题链接 题目大意:首先学习一个生物学的单词,exon:外显子,DNA序列中能够翻译表达的片段.给出很多外显子的起始点和终点,求寻找包含最多外显子的一条链,并且输出这些外显子的编号. 解法:先把所有外 ...