解决 RaspberryPi 树莓派 NTP服务异常 无法自动同步时间

sudo nano /etc/ntp.conf

然后找到

# pool.ntp.org maps to about 1000 low-stratum NTP servers. Your server will
# pick a different set every time it starts up. Please consider joining the
# pool: <http://www.pool.ntp.org/join.html>
server 0.debain.pool.ntp.org iburst
server 1.debain.pool.ntp.org iburst
server 2.debain.pool.ntp.org iburst
server 3.debain.pool.ntp.org iburst

或者类似的东西,把它改成

# pool.ntp.org maps to about 1000 low-stratum NTP servers. Your server will
# pick a different set every time it starts up. Please consider joining the
# pool: <http://www.pool.ntp.org/join.html>
server asia.pool.ntp.org iburst

重启即可

原理: 原来的NTP服务器pool(提供服务器名称的网站)貌似被墙了,因此改成这样(asia.pool.ntp.org

时间: 2024-08-05 01:15:22

解决 RaspberryPi 树莓派 NTP服务异常 无法自动同步时间的相关文章

怎么让CentOS集群自动同步时间

怎么让CentOS集群自动同步时间?首先机器要连外网,这样才能从互联网上同步时间,这是首先要了解的.好了,主要的方法如下: 在除了运行ntpd之外的机器上,执行: [html] # chkconfig --list | grep ntpd 看看ntpd有没有开机自启动(如果显示的全为off则表明不是开机自启动),如果是开机自启动的,需要执行: [html] # chkconfig ntpd off 关闭ntpd,如果ntpd开着,ntpdate没办法从其他服务器同步时间的. 然后在/etc/rc

web服务文件更新自动同步、数据库主从复制、shell脚本实现网站代码备份和mysql备份

基搭建LAMP环境,并实践基于DNS做基于域名的虚拟主机中的环境,重新搭建一个同样的环境 要求: a)实现web服务文件更新的自动同步到另一台机器上 b)数据库实现主从复制 c)通过shell脚本实现网站源代码备份和mysql备份,备份策略包括全量备份.增量备份.差异备份 a,实现web服务文件更新的自动同步到另一台机器上: 1,在httpd服务器上建立基于FQDN的两个虚拟web站点,并创建相关目录. 2,修改测试windows主机的hosts文件,并编辑两个虚拟web站点对应的目录下的ind

ntp服务端和客户端同步配置

ntp服务端配置(centos7) 一.打开UDP123端口INPUT -m state --state NEW -m udp -p udp --dport 123 -j ACCEPT.然后重启防火墙服务器  service firewalld restart 或直接关闭防火墙service firewalld stop,    chkconfig firewalld off 二.查看有没有ntp服务rpm –qa|grep ntp,如果没有则安装yum install –y ntp 三.要同步

利用ntp自动同步时间

实验环境:centos 6.10 1.安装ntp工具 yum install -y ntp 2.便宜/etc/ntp.conf文件,添加远程时间服务器 server ntp1.aliyun.com server ntp2.aliyun.com server ntp3.aliyun.com server ntp4.aliyun.com 3.启动ntpd后台进程,设置开机启动 service ntpd start chkconfig ntpd on 原文地址:https://www.cnblogs.

centos7上使用chrony自动同步时间

作用: 在linux中,有些服务必须依靠准确的时间,才能够在运行的时候不出差错,例如DNS,LVS,HTTPS等,都需要后台的服务器之间保持时间的同步.而Centos系统中自带的有安装对应的同步时间的服务.centos7中默认安装的是chrony,而Centos6相比在时间服务有所不同,使用了ntp服务来同步时间,而在Centos7上则使用的是chrony服务来同步时间,相较与ntp服务.chrony服务有如下几点优势: 1,更快的同步只需要数分钟而非数小时时间,从而最大程度减少了时间和频率误差

CentOS集群自动同步时间的一种方法

之前有篇日志是手动同步时间的 http://www.ahlinux.com/os/201304/202456.html 之所以这么干,是因为我们实验室的局域网只有一部分IP可以访问外网,服务器所用的IP恰好上不了外网,没法从互联网上同步时间,只好在本地设一台ntp服务器,从这一台机器同步时间了. 可是昨晚上实验室停电,今天早上开机之后发现服务器的时间差了不少(那几台作为服务器的台式机都5.6年了,估计是CMOS电池不行了). 手动一台台地同步时间(执行ntpdate xxx)实在很麻烦. 于是尝

CentOS自动同步时间

安装ntpdate yum install ntpdate -y 测试是否正常 ntpdate cn.ntp.org.cn # 正常情况 [[email protected] www]# ntpdate cn.ntp.org.cn 3 Mar 20:52:20 ntpdate[9748]: adjust time server 202.108.6.95 offset -0.017460 sec 设置定时任务 crontab -e */10 * * * * ntpdate cn.ntp.org.c

Linux服务器设置自动同步时间

登录Linux服务器的时候,你可能发现与实际时间不一样,需要调整 安装ntpdate >yum install ntp 输入ntpdate time.nist.gov 其中 time.nist.gov 是一个时间服务器. 如此,设置时间OK了.

centos7 自动同步时间

rm -rf /etc/localtime ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime vim /etc/sysconfig/clock ZONE="Asia/Shanghai" UTC=false ARC=false yum install -y ntp systemctl start ntpd systemctl enable ntpd vim /etc/rc.d/rc.local /usr/sbin/ntpdate