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- ...
随机推荐
- sql 学习
.查看表结构用desc desc emp; 2.空表dual,最常用的空表,如: select 2 * 4 from dual; select sysdate from dual; 3.双引号 ...
- nagios系列(七)nagios通过自定义脚本的方式监控mysql主从同步
nagios监控mysql主从同步 起因:nagios可能监控到mysql服务的运行情况,但确不能监控mysql的主从复制是否正常:有时候,同步已经停止,但管理人员却不知道. 登陆mysql从服务器, ...
- JS正则表达式大全(附例子)
0 前言 正则表达式用来字符串匹配,格式校验,非常cool且有趣. 1 正则表达式中的特殊字符 \ 做为转义,即通常在"\"后面的字符不按原来意义解释,如/b/匹配字符" ...
- .net core定时任务
1.HangFire HangFire官网 Hangfire项目实践分享 : 讲解的比较详细 2.Quartz.NET https://www.cnblogs.com/best/p/7658573. ...
- 区间dp好题cf149d 括号匹配
见题解链接https://blog.csdn.net/sdjzping/article/details/19160013 #include<bits/stdc++.h> using nam ...
- 性能测试二十一:环境部署之mysql
在正常工作中,mysql应该部署到 一台独立的服务器上,不与tomcat共用服务器,由于成本原因,现部署到一起 为避免出错引起麻烦,先备份: 一:环境清理:先卸载系统自带的mysql 停止mysql: ...
- python 全栈开发,Day29(昨日作业讲解,模块搜索路径,编译python文件,包以及包的import和from,软件开发规范)
一.昨日作业讲解 先来回顾一下昨日的内容 1.os模块 和操作系统交互 工作目录 文件夹 文件 操作系统命令 路径相关的 2.模块 最本质的区别 import会创建一个专属于模块的名字, 所有导入模块 ...
- python 全栈开发,Day27(复习, defaultdict,Counter,时间模块,random模块,sys模块)
一.复习 看下面一段代码,假如运行结果有问题,那么就需要在每一步计算时,打印一下结果 b = 1 c = 2 d = 3 a = b+c print(a) e = a + d print(e) 执行输 ...
- hdu 1455 N个短木棒 拼成长度相等的几根长木棒 (DFS)
N根短木棒 能够拼成几根长度相等的长木棒 求长木棒的长度 如果答案不止一种 输出最小的 Sample Input95 2 1 5 2 1 5 2 141 2 3 40 Sample Output65 ...
- HDU 2594 最长相同前后缀
Sample Inputclintonhomerriemannmarjorie Sample Output0rie 3 输入两个字符串 ,求最长相同前后缀直接把两个字符串连接在一起求next就行了,唯 ...