Linux(NTP配置)

后面也会持续更新,学到新东西会在其中补充。
建议按顺序食用,欢迎批评或者交流!
缺什么东西欢迎评论!我都会及时修改的!

NTP环境搭建

服务端 客户端
192.168.111.10 192.168.111.11
Linux MySQL5.7 3.10.0-1160.el7.x86_64 #1 SMP Mon Oct 19 16:18:59 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux Linux MySQL5.7 3.10.0-1160.el7.x86_64 #1 SMP Mon Oct 19 16:18:59 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
CentOS Linux release 7.9.2009 (Core) CentOS Linux release 7.9.2009 (Core)
#服务端客户端都执行
sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config
systemctl stop firewalld.service
systemctl disable firewalld.service

NTP服务器端安装与配置

# 安装ntpd服务
yum install ntp -y
[root@MySQL5 ~]# rpm -qa | grep ntp
ntpdate-4.2.6p5-29.el7.centos.2.x86_64
fontpackages-filesystem-1.44-8.el7.noarch
ntp-4.2.6p5-29.el7.centos.2.x86_64
#配置ntpd服务

#备份文件
cp /etc/ntp.conf{
   
   ,.bak}

vi /etc/ntp.conf
server 127.127.1.0
fudge 127.127.1.0 startnum 10 
restrict 127.0.0.1 
restrict 192.168.111.0 netmask 255.255.255.0 
driftfile /var/lib/ntp/ 
logfile /var/log/ntp/ntp.log

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 iburst

server time1.apple.com iburst
server time2.apple.com iburst
server time3.apple.com iburst
server time4.apple.com iburst
server time5.apple.com iburst

server time1.google.com iburst
server time2.google.com iburst
server time3.google.com iburst
server time4.google.com iburst

server pool.ntp.org iburst
server cn.pool.ntp.org iburst
server ntp1.aliyun.com iburst
server ntp2.aliyun.com iburst
server time1.aliyun.com iburst
server time2.aliyun.com iburst

在这里插入图片描述

<
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值