惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

酷 壳 – CoolShell
酷 壳 – CoolShell
H
Hacker News: Front Page
P
Palo Alto Networks Blog
T
ThreatConnect
Apple Machine Learning Research
Apple Machine Learning Research
博客园_首页
T
True Tiger Recordings
P
Privacy & Cybersecurity Law Blog
B
Blog
IT之家
IT之家
Last Week in AI
Last Week in AI
F
Full Disclosure
Hacker News: Ask HN
Hacker News: Ask HN
C
Comments on: Blog
Microsoft Azure Blog
Microsoft Azure Blog
C
Cybersecurity and Infrastructure Security Agency CISA
Microsoft Security Blog
Microsoft Security Blog
博客园 - 【当耐特】
N
News and Events Feed by Topic
NISL@THU
NISL@THU
腾讯CDC
雷峰网
雷峰网
Security Latest
Security Latest
李成银的技术随笔
M
Microsoft Research Blog - Microsoft Research
L
LangChain Blog
L
Lohrmann on Cybersecurity
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
C
Check Point Blog
Y
Y Combinator Blog
Recent Announcements
Recent Announcements
博客园 - Franky
N
News | PayPal Newsroom
V
V2EX
A
About on SuperTechFans
The Register - Security
The Register - Security
月光博客
月光博客
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Google Online Security Blog
Google Online Security Blog
MyScale Blog
MyScale Blog
Cisco Talos Blog
Cisco Talos Blog
Vercel News
Vercel News
WordPress大学
WordPress大学
C
Cyber Attacks, Cyber Crime and Cyber Security
The Hacker News
The Hacker News
IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
爱范儿
爱范儿
A
Arctic Wolf
L
LINUX DO - 最新话题
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More

博客园 - 找不到Object

57.基于springboot+vue的宠物领养平台 达梦数据库导出表结构到excel中 vware中centos虚拟机系统和宿主使用同一局域网 Excel中利用vba代码导出图片时以某一单元格内容重命名 vware中ubuntu虚拟机系统和宿主使用同一局域网 mysql查询近几天sql centos7离线安装docker liunx虚拟机VMware增加磁盘空间后,挂载磁盘 liunx服务器22端口开启 centos7安装nginx nginx常用配置说明 centos7通过docker安装mysql centos7下安装docker VMware 虚拟机下CentOS 7连接网络 在JSP中使用el函数标签获取默认值(男女性别选项) ssm登录与退出 MVC(Model -View-Controller)实例应用模式 MVC模式 设计模式浅谈
centos 7 NTP离线安装部署
找不到Object · 2022-04-15 · via 博客园 - 找不到Object

1.下载三个rpm离线包

ntpdate-4.2.6p5-29.el7.centos.2.x86_64

ntp-4.2.6p5-29.el7.centos.2.x86_64

autogen-libopts-5.18-5.el7.x86_64

地址:

http://mirror.centos.org/centos/7/os/x86_64/Packages/ntpdate-4.2.6p5-29.el7.centos.2.x86_64.rpm

http://mirror.centos.org/centos/7/os/x86_64/Packages/ntp-4.2.6p5-29.el7.centos.2.x86_64.rpm

http://mirror.centos.org/centos/7/os/x86_64/Packages/autogen-libopts-5.18-5.el7.x86_64.rpm

2.上传至centos安装

ntp -ivh ntpdate-4.2.6p5-29.el7.centos.2.x86_64.rpm

ntp -ivh ntp-4.2.6p5-29.el7.centos.2.x86_64

ntp -ivh autogen-libopts-5.18-5.el7.x86_64.rpm

 3.查看安转版本 rpm -q ntp

 4. 启用ntp服务  systemctl enable ntpd 

 

 5.开始ntp服务 systemctl start ntpd

     查看状态 systemctl status  ntpd

6. 编辑master的机器的文件/etc/ntp.conf

找到ntp时间同步的机器范围配置项
restrict 192.168.3.0 mask 255.255.255.0 nomodify notrap
这里的意思代表,192.168.3的网段的机器都参与ntp的时间同步

# For more information about this file, see the man pages
# ntp.conf(5), ntp_acc(5), ntp_auth(5), ntp_clock(5), ntp_misc(5), ntp_mon(5).

driftfile /var/lib/ntp/drift

# Permit time synchronization with our time source, but do not
# permit the source to query or modify the service on this system.
restrict default nomodify notrap nopeer noquery

# Permit all access over the loopback interface. This could
# be tightened as well, but to do so would effect some of
# the administrative functions.
restrict 127.0.0.1
restrict ::1

# Hosts on local network are less restricted.
restrict 192.168.111.0 mask 255.255.255.0 nomodify notrap

# Use public servers from the pool.ntp.org project.
# Please consider joining the pool (http://www.pool.ntp.org/join.html).
server ntp1.aliyun.com
server ntp2.aliyun.com
server ntp3.aliyun.com
server 127.0.0.1
fudge 127.0.0.1 stratum 10

#broadcast 192.168.1.255 autokey # broadcast server
#broadcastclient # broadcast client
#broadcast 224.0.1.1 autokey # multicast server
#multicastclient 224.0.1.1 # multicast client
#manycastserver 239.255.254.254 # manycast server
#manycastclient 239.255.254.254 autokey # manycast client

# Enable public key cryptography.
#crypto

includefile /etc/ntp/crypto/pw

# Key file containing the keys and key identifiers used when operating
# with symmetric key cryptography.
keys /etc/ntp/keys

# Specify the key identifiers which are trusted.
#trustedkey 4 8 42

# Specify the key identifier to use with the ntpdc utility.
#requestkey 8

# Specify the key identifier to use with the ntpq utility.
#controlkey 8

# Enable writing of statistics records.
#statistics clockstats cryptostats loopstats peerstats

# Disable the monitoring facility to prevent amplification attacks using ntpdc
# monlist command when default restrict does not include the noquery flag. See
# CVE-2013-5211 for more details.
# Note: Monitoring will not be disabled with the limited restriction flag.
disable monitor

ntp.conf中有默认的时间服务器,我们需要注销,然后添加上我们对应的时区时间服务器。
server ntp1.aliyun.com
server ntp2.aliyun.com
server ntp3.aliyun.com

///当以上三个时间服务器不可用时,就是以本机时间作为集群机器的统一时间。
server 127.0.0.1
fudge 127.0.0.1 stratum 10

 

 6.更新时间 ntpdate -u ntp2.aliyun.com

7.配置客户机 /etc/ntp.conf  

server 192.168.111.128

同步时间命令 ntpdate -u  192.168.111.128  需要关闭防火墙