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

<

最低0.47元/天 解锁文章
1441

被折叠的 条评论
为什么被折叠?



