当前位置: 首页 > news >正文

【Linux】NTP服务器配置、时间修改

 查看当前系统时间date修改当前系统时间date -s "2018-2-22 19:10:30"查看硬件时间hwclock --show修改硬件时间hwclock --set --date "2018-2-22 19:10:30"同步系统时间和硬件时间hwclock --hctosys保存时钟clock –w
1.设置NTP Server服务检查系统是否安装ntp服务:
rpm -qa | grep ntp编辑配置文件:
vim /etc/ntp.conf
1)注释
# Use public servers from the pool.ntp.org project.
# Please consider joining the pool (http://www.pool.ntp.org/join.html).
#server 0.centos.pool.ntp.org iburst
#server 1.centos.pool.ntp.org iburst
#server 2.centos.pool.ntp.org iburst
#server 3.centos.pool.ntp.org iburst2)添加以下配置       
server 127.127.1.0
fudge 127.127.1.0 stratum 103)启动ntpd服务           
#开启ntp默认端口123(vim /etc/sysconfig/iptables),添加下面配置
-A INPUT -s 10.44.99.84/32 -p udp -m udp --dport 123 -j ACCEPT#启动ntpd服务
systemctl start ntpd#设置开机自启动
chkconfig ntpd on#查看NTP是否正常运行
netstat -tlunp |  grep ntp#查看ntp服务器有无和上层ntp连通
ntpstat#查看ntp服务器与上层ntp的状态
ntpq –p

在这里插入图片描述

http://www.lryc.cn/news/212802.html

相关文章:

  • 毕业设计基于SpringMVC+Mybatis+Bootstrap的电影院管理系统源码+数据库
  • vantUI(Tabbar标签页)浏览器返回上一页的失效问题
  • 【算法】Prim算法(求最小生成树)
  • go语言,yaml实现简单的workflow工作流
  • BaiduMallServcie
  • vue3+jsx+antd的插槽写法之一
  • Shell 学习之 if 命令
  • android 同步 服务器 时间
  • 10、电路综合-基于简化实频的宽带匹配电路设计方法
  • N-130基于springboot,vue校园社团管理系统
  • Syntax Error: TypeError: this.getOptions is not a function的解决(Vue)
  • 使用 kube-downscaler 降低Kubernetes集群成本
  • LeetCode热题100——哈希表
  • Kubeadm
  • 【Overload游戏引擎细节分析】PBR材质Shader---完结篇
  • C++设计模式_18_State 状态模式
  • 详解final, abstract, interface关键字
  • 统计特殊四元组
  • 腾讯云轻量应用服务器“镜像”怎么选择合适?
  • Ruby模块和程序组织
  • 14、SpringCloud -- WebSocket 实时通知用户
  • 智能井盖传感器推荐,万宾科技助力城市信息化建设
  • 3D模型格式转换工具HOOPS Exchange对工业级3D产品HOOPS的支持与应用
  • table 表体滚动, 表头、表尾固定
  • 第57篇-某钩招聘网站加密参数分析【2023-10-31】
  • C语言数据结构之数据结构入门
  • 如何知道服务器的某个端口是否打开
  • 【ICCV‘23】One-shot Implicit Animatable Avatars with Model-based Priors
  • 关于息肉检测和识别项目的总结
  • Jetson Xavier NX FFmpeg支持硬件编解码