centos7 修改同步时间
同步时间
安装ntp软件
[root@node2 ~]# yum install ntp
将ntp设为开机启动
[root@node2 ~]# systemctl enable ntpd
修改启动参数,增加-g -x参数,允许ntp服务在系统时间误差较大时也能正常工作
[root@node2 ~]# vim /etc/sysconfig/ntpd # Command line options for ntpd
OPTIONS="-g -x"
~
启动ntp服务
[root@node2 ~]# service ntpd restart
将系统时区改为上海时间 (亦即CST时区)
[root@node2 ~]# ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
查看时间是否正确
[root@node2 ~]# date
可与国家时间授权中心时间校队
http://www.zou114.com/bjtime/
centos7 修改同步时间的更多相关文章
- linux CentOS7 修改系统时间
linux在安装的时候如果时区选择错误,可以在系统安装完成之后修改.系统时间运行着也会有偏差,需要对时间进行实时同步,方法如下: 打开terminal 首先转到root权限 :并输入密码 然后输入:t ...
- CentOS7 修改系统时间
yum -y install ntp [root@localhost kevin]# systemctl enable ntpdsystemctl start ntpdntpdate us.pool. ...
- Centos7 修改系统时间和硬件时间不一致的问题
查看系统时间 [root@localhost ~]# dateSat Feb 24 14:41:22 CST 2018 查看硬件时间 [root@localhost ~]# hwclock --sho ...
- Centos7 修改硬件时间和系统时间
查看系统时间 [root@localhost ~]# date Tue Jun 13 10:20:13 CST 2017 查看硬件时间 [root@localhost ~]# hwclock --sh ...
- (转)Centos7 修改硬件时间和系统时间
查看硬件时间 [root@localhost ~]# hwclock --show Tue 13 Jun 2017 02:11:12 AM CST -0.848845 seconds 1 2 可以看出 ...
- 吴裕雄--天生自然 Hadoop大数据分布式处理:centos7修改系统时间、时区
cp -f /usr/share/zoneinfo/Asia/Shanghai /etc/localtime 修改完后需要重启.
- centos7修改系统时间、时区
直接用下面命令直接更换时区 cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
- centos7 自动同步时间
rm -rf /etc/localtime ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime vim /etc/sysconfig/cloc ...
- Linux修改时区以及同步时间
Centos7为例:修改时区 timedatectl list-timezones |grep Shanghai #查找中国时区的完整名称 Asia/Shanghai timedatectl set- ...
随机推荐
- Python3学习笔记17-类与实例
面向对象最重要的概念就是类(Class)和实例(Instance),必须牢记类是抽象的模板,比如Student类 而实例是根据类创建出来的一个个具体的“对象”,每个对象都拥有相同的方法,但各自的数据可 ...
- git 的入门使用到团队协作
1.git 的安装.下载---安装,esay. 下载地址:https://git-for-windows.github.io/ 2.创建一个自己的身份 git config --global user ...
- svn使用小技巧
在使用svn的时候,往往导入到eclipse中,使用eclipse进行提交修改,但是当删除文件夹的时候,eclipse会发生冲突,不能够提交. 使用一种方式,将svn上的项目跟你eclipse对应项目 ...
- mysql当查询某字段结果为空并赋值
1 代码 1.1 当当前字段为空,查询结果返回“none”,并且统计出现频率 select case when 字段 is null then 'none' else 字段 end as 字段, co ...
- unicode-range特定字符使用font-face自定义字体
链接: https://www.zhangxinxu.com/wordpress/2016/11/css-unicode-range-character-font-face/
- pytorch实现花朵数据集读取
import os from PIL import Image from torch.utils import data import numpy as np from torchvision imp ...
- Codeforces 5C Longest Regular Bracket Sequence(DP+括号匹配)
题目链接:http://codeforces.com/problemset/problem/5/C 题目大意:给出一串字符串只有'('和')',求出符合括号匹配规则的最大字串长度及该长度的字串出现的次 ...
- poj1511,线段树扫描线面积
经典题,线段树扫描线其实类似区间更新,一般的做法是想象一根扫描线从上扫到下或者从左扫到右,本题的做法是从上扫到下 只要扫到了一根水平线,就将其更新到线段树对应区间中,区间和它的子区间是独立更新的 #i ...
- C# mongoDB Driver 使用对象方式查询语法大全
#region 查询方法 /// <summary> /// 获取单个对象 /// </summary> /// <typeparam name="T" ...
- POJ 3050 Hopscotch【DFS带回溯】
POJ 3050 题意: 1.5*5的方阵中,随意挑一格,记住这个格子的数字 2.可以上下左右走,走5次,每走一次记录下所走格子的数字 3.经过以上步骤,把所得6个数字连起来,形成一串数字.求共可以形 ...