CentOS7 时间设置与网络同步
1.查看时区
[root@localhost /]# date -R
Thu, Jul :: +
+0800表示东八区,这边就不用再设置
时区中的CST表示中国标准时间。
时区相关共享文件在/usr/share/zoneinfo下,中国一般选择/usr/share/zoneinfo/Asia/Shanghai.
如果时区错误要设置,就执行下面命令:
cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
2.查看系统时间
[root@localhost etc]# date
2018年 07月 12日 星期四 :: CST
3.查看硬件时间
[root@localhost etc]# hwclock
2018年07月12日 星期四 19时10分23秒 -0.210599 秒
4.网络同步时间
[root@localhost etc]# yum -y install ntp ntpdate
......
[root@localhost etc]# ntpdate cn.pool.ntp.org
Jul :: ntpdate[]: step time server 85.199.214.101 offset -28374.974285 sec
[root@localhost etc]# date
2018年 07月 12日 星期四 :: CST
先安装ntpdate工具
再设置系统时间与网络时间同步
再次查看时间,就与真实时间一样了
5.将系统时间写入硬件时间
[root@localhost etc]# hwclock -w
6.强制系统时间写入CMOS中防止重启失效
hwclock -w
或clock -w
参考:
https://blog.csdn.net/u011391839/article/details/62892020
https://www.douban.com/note/548483860/
CentOS7 时间设置与网络同步的更多相关文章
- CentOS7时间设置及ntp同步配置(转)
出处:http://www.centoscn.com/CentOS/config/2015/1105/6385.html http://www.centoscn.com/CentOS/config/2 ...
- linux 设置与网络同步的时间
#设置linux时间 与网络时间同步安装命令yum install -y ntp同步网络时间ntpdate ntp1.aliyun.com
- CentOS7时间和日期的同步 (chrony和)
CentOS 6版本,使用 hwclock CentOS 7版本,使用timedatectl 1.基本概念 1.1 GMT,UTC,CST,DST时间 世界标准时间 整个地球分为二十四时区,每个时区都 ...
- centos7 时间设置
安装完成centos7后,虽然时区选择的是上海,但是最终的时间还是不对,因为没有开启自动同步NTP功能,所以需要自动手动设置. 首先输入timedatectl命令,查看当前机器的时间: Local t ...
- CentOS7时间设置问题
本地安装一个VMWare player虚拟机客户端,并安装了Linux CentOS7 Basic Web Server系统,时区在安装时已经选择了Asia/Shanghai,但是安装完成后,时间和当 ...
- centos7 时间设置及ntp
转自:https://blog.gtwang.org/linux/howto-set-date-time-from-linux-command-prompt/ 這裡介紹各種在 Linux 中以手動來調 ...
- Linux 时间设置和同步服务
修改日期时间的工具 date hwclock timedatectl date工具的使用 作用:显示和设置系统时间 选项: -d <字符串> 显示字符串所指的日期与时间,比如:" ...
- centos7 时间自动同步
设置开机自动同步Internet时间,并作定时同步任务1.修改时区 rm -rf /etc/localtime ln -s /usr/share/zoneinfo/Asia/Shanghai /etc ...
- CentOS7日期时间设置方法以及时间基本概念介绍
在CentOS 6版本,时间设置有date.hwclock命令,从CentOS 7开始,使用了一个新的命令timedatectl. 一.基本概念 1.1 GMT.UTC.CST.DST 时间 (1) ...
随机推荐
- Hotfix
http://group.jobbole.com/6311/ http://www.jianshu.com/p/6f0ae1e364d9 http://www.mamicode.com/info-de ...
- 记一次CentOS5.7更新glibc导致libc.so.6失效,系统无法启动
以下是错误示范,错误过程还原,请勿模仿!!! wkhtmltopdf 启动,提示/lib64/libc.so.6版本过低 $ ./wkhtmltopdf http:www.baidu.com 1. ...
- word2vector 资料
http://blog.csdn.net/garfielder007/article/details/51345201 https://cs224d.stanford.edu/lecture_note ...
- JavaScript-----截取字符串的常用方法
1.substring(start,stop) 用于提取字符串中介于两个指定下标之间的字符 start 必需,一个非负的整数,规定要提取的子串的第一个字符在 stringObject 中的位置 ...
- 网易新网 spider
# -*- coding: utf-8 -*- import os import sys import urllib.request import requests import re from lx ...
- SQL数据分析概览——Hive、Impala、Spark SQL、Drill、HAWQ 以及Presto+druid
转自infoQ! 根据 O’Reilly 2016年数据科学薪资调查显示,SQL 是数据科学领域使用最广泛的语言.大部分项目都需要一些SQL 操作,甚至有一些只需要SQL. 本文涵盖了6个开源领导者: ...
- Lucene 个人领悟 (一)
在上学的时候就对搜索有着极大地兴趣,图书馆也借了好多的书看过,也用过Python写过爬虫. 有好多人在初步学习Lucene的时候都以为他是一个搜索引擎,或者搜索工具. 在此我要特别强调一下,Lucen ...
- MySQL性能测试工具sysbench的安装和使用
sysbench是一个开源的.模块化的.跨平台的多线程性能测试工具,可以用来进行CPU.内存.磁盘I/O.线程.数据库的性能测试.目前支持的数据库有MySQL.Oracle和PostgreSQL.当前 ...
- Centos7升级gcc学习笔记 gcc 4.8.5 -> gcc 5.4.0
摘自:https://www.cnblogs.com/highway-9/p/5628852.html 一.安装开发必备环境: yum groupinstall "Development T ...
- animate和translate
transition, transform, tanslate,animation分别为过渡,变换,平移.动画.transform的属性包括:rotate() / skew() / scale() / ...