171015chrony时间同步
来源:互联网 发布:thinkphp商城源码下载 编辑:程序博客网 时间:2024/06/05 19:41
chrony时间同步:
(server端172.25.254.101,client端172.25.254.201)
在client端用timedatectl命令将时间改为11:11:11
而server端时间如下
server:
yum install chrony -y ##安装服务
vim /etc/chrony.conf ##主配置文件
21 # Allow NTP client access from local network. 22 allow 172.25.254.0/24 ##允许谁去同步我的时间 23 24 # Listen for commands only on localhost. 25 bindcmdaddress 127.0.0.1 26 bindcmdaddress ::1 27 28 # Serve time even if not synchronized to any NTP server. 29 local stratum 10 ##不去同步任何人的时间,时间同步服务器级别
22行:去掉注释并改为允许172.25.254.x网段的机器同步server端的时间
29行:去掉注释
systemctl stop firewalld
systemctl restart chronyd.service
client:
vim /etc/chrony.conf
3-6行注释,增加第7行内容,表示从哪台主机同步时间。
systemctl restart chronyd.service
chronyc sources -v查看状态
systemctl restart chronyd
重启服务,过一会发现client端时间与server一样了。
timedatectl命令
timedatectl status ##显示当前时间信息
set-time ##设定当前时间
set-timezone ##设定当前时区
set-local-rtc 0|1 ##设定是否使用utc时间
timedatectl set-time 11:00:00 #将时间修改为11:00:00
timedatectl set-timezone "Asia/Shanghai" #将时区修改为“亚洲/上海”
- 171015chrony时间同步
- 04-NTP.CHRONY时间同步服务
- Linux之chrony时间同步服务配置
- 使用chrony代替ntp同步时间
- 集群服务器安装时间同步服务(chrony)
- Centos 7.3_1611使用chrony做时间同步
- RHEL7 -- 使用Chrony设置时间与时钟服务器同步
- chrony, ntp, 同步
- 时间服务器ntp和chrony
- CentOS7.2 chrony替代ntp搭建时间服务器
- CentOS7.2 chrony替代ntp搭建时间服务器
- 时间同步
- 时间同步
- 时间同步
- 同步时间
- 时间同步
- 时间同步
- 时间同步
- 如果看了此文你还不懂傅里叶变换,那就过来掐死我吧【完整版】
- Int类型的集合类的设计实现
- 批量单变量求解 office wps 单变量求解比较
- 两两交换链表中的节点-LintCode
- Scala学习笔记-控制结构和函数(2)
- 171015chrony时间同步
- USB相关知识
- 一 python 运算符
- 【ViSP 3.1.0 main page】
- 解读zookeeper的配置项
- Mysql 访问控制2 Request Verification
- VC2010项目中附加包含目录
- 到底vuex是什么
- 深入理解Spring MVC