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的更多相关文章

  1. win2003系统同步Linux ntp server批处理

    最后更新时间: 2018/12/15 一般windows配置时间服务器,只需要在windows系统右下角,点时间,里面配置好对应NTP服务器地址就行, 至多再修改一下注册表 HKEY_LOCAL_MA ...

  2. L01-RHEL6.5中部署NTP(ntp server + client)

    RHEL6.5集群中部署NTP NTP全称为Network Time Protocol,即网络时间协议.一般在Linux系统中用来同步集群中不同机器的时间. 本文描述的ntp服务部署框架如下图示 如上 ...

  3. linux+udp+server+client

    一.客户端 #include<sys/types.h> #include<sys/socket.h> #include<netinet/in.h> #include ...

  4. linux 下使rdate命令支持ipv6 ntp server 同步时间

    如果使用linux 下,busybox自带的rdate命令 去ipv6 的ntp server 同步时间的话,会提示invalid argument :无效参数. 那么现在下载rdate的源码并对其进 ...

  5. Linux NTP服务器的搭建及client自动更新时间

    Network Time Protocol(NTP)是用来使计算机时间同步化的一种协议,它可以使计算机对其服务器或时钟源(如石英钟,GPS等等)做同步化,它可以提供高精准度的时间校正(LAN上与标准间 ...

  6. linux c server and client 简单的通信

    server.c #include <stdlib.h> #include <stdio.h> #include <errno.h> #include <st ...

  7. Linux 上配置 NTP SERVER

    在CENTOS 6.2上面安装配置NTP SERVER 安装NTP:yum install ntp 配置时间源vi /etc/ntp.confserver 210.72.145.44server nt ...

  8. linux ntp时间同步

    linux ntp时间同步 一.搭建时间同步服务器1.编译安装ntp serverrpm -qa | grep ntp若没有找到,则说明没有安装ntp包,从光盘上找到ntp包,使用rpm -Uvh n ...

  9. linux ntp时间服务器配置

    Network Time Protocol (NTP) 也是RHCE新增的考试要求. 学习的时候也顺便复习了一下如何设置Linux的时间,现在拿出来和大家分享 设置NTP服务器不难但是NTP本身是一个 ...

  10. linux NTP配置

    时间是由计算机内的石英晶体振荡电路以:NetworkTimeProtocol(NTP):通常情况下,时间同步是按以下步骤进行的::(1):NTP客 户端向NTP服务器发出一个时间请:(2):当服务器接 ...

随机推荐

  1. Design Patterns----简单的工厂模式

    实例: 实现一个简单的计算器.实现加减乘除等操作.. operator.h 文件 // copyright @ L.J.SHOU Mar.13, 2014 // a simple calculator ...

  2. 正确的SVN导入代码命令

    sudo svn import -m "" /media/yang/10/ubuntuFiles/svnAbout/mypro/ svn://127.0.0.1/mypro/

  3. 【LeetCode OJ】Word Ladder II

    Problem Link: http://oj.leetcode.com/problems/word-ladder-ii/ Basically, this problem is same to Wor ...

  4. Bootstrap全局css

    HTML中的所有标题标签,<h1>到<h6>均可使用.另外,还提供了.h1到.h6类,为的是给内联(inline)属性的文本赋予标题的样式.在标题内还可以包含<small ...

  5. html5zero 网站模板 影片素材

    1. http://www.html5zero.com/ HTML5 Zero 收录来自各个网站的网站模版资源,支持响应式网页设计,部分能直接套用于 WordPress.Bootstrap 外,有 M ...

  6. Palindrome_滚动数组&&DP

    Description A palindrome is a symmetrical string, that is, a string read identically from left to ri ...

  7. List<T>转换为DataTable

    List<info> infos = Dal.GetInfos(); DataTable dt = new DataTable(); dt.Columns.Add("cName& ...

  8. ZOJ 3811

    http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=5343 网络赛这水题没写过太伤了,赛后写了下1A. 当时钻牛角尖一定要用k次bf ...

  9. sql2008+vs2008安装心得以及详细教程分享

    第一步,我把原来装的vs2005+sql2005全部卸载了 第二步,下载VS2008同时下载sql2008: 第三步,开始安装VS2008专业版,网上有很多给出了微软的地址,在这里我也贴一个吧 htt ...

  10. chromium 安装 pepper flash player

    打开终端,输入以下命令即可安装: 1. sudo apt-get update 2. sudo apt-get install chromium-browser 3. sudo apt-get ins ...