centos6安装部署ntp
2021/12/10 7:22:38
本文主要是介绍centos6安装部署ntp,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
环境:
OS:Centos 6
1.检查ntp是否安装
[root@localhost /]# rpm -qa|grep ntp
ntp-4.2.6p5-1.el6.centos.x86_64
ntpdate-4.2.6p5-1.el6.centos.x86_64
fontpackages-filesystem-1.41-1.1.el6.noarch
2.修改配置
vi /etc/ntp.conf
//添加如下配置内容
//默认允许任何主机进行时间同步
restrict default ignore
server cn.pool.ntp.org perfer
server 0.cn.pool.ntp.org
server 1.cn.pool.ntp.org
server asia.pool.ntp.org
server 0.asia.pool.ntp.org
server 1.asia.pool.ntp.org
restrict cn.pool.ntp.org nomodify notrap noquery
restrict 0.cn.pool.ntp.org nomodify notrap noquery
restrict 1.cn.pool.ntp.org nomodify notrap noquery
restrict asia.pool.ntp.org nomodify notrap noquery
restrict 0.asia.pool.ntp.org nomodify notrap noquery
restrict 1.asia.pool.ntp.org nomodify notrap noquery
server 127.127.1.0 # local clock
fudge 127.127.1.0 stratum 10
3.设置开机自启动
[root@localhost /]# chkconfig ntpd on
4.启动NTP服务
[root@localhost /]#service ntpd start
[root@localhost /]# service ntpd status
5.查看
ntpstat
ntpq -p
这篇关于centos6安装部署ntp的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-06-29易优CMS安装常见问题汇总-icode9专业技术文章分享
- 2024-06-28易优新手必读安装教程-icode9专业技术文章分享
- 2024-06-28忘记eyoucms后台密码怎么办?-icode9专业技术文章分享
- 2024-06-26终极指南:Scrum中如何设置需求优先级
- 2024-06-26AI大模型企业应用实战(25)-为Langchain Agent添加记忆功能
- 2024-06-26小白家庭 nas 搭建方案-icode9专业技术文章分享
- 2024-06-23AI大模型企业应用实战(14)-langchain的Embedding
- 2024-06-23AI大模型企业应用实战(15)-langchain核心组件
- 2024-06-23AI大模型企业应用实战(16)-langchain核心组件
- 2024-06-23AI 大模型企业应用实战(06)-初识LangChain