linux 时间同步(阿里云ntp服务器)
1、安装ntp服务
root@localhost ~]# yum -y install ntp 已加载插件:fastestmirror, langpacks Loading mirror speeds from cached hostfile * base: mirrors.nju.edu.cn * centos-sclo-rh: mirrors.nju.edu.cn * centos-sclo-sclo: mirrors.huaweicloud.com * epel: mirrors.huaweicloud.com * extras: mirrors.nju.edu.cn * nux-dextop: mirror.li.nux.ro * updates: mirrors.nju.edu.cn 软件包 ntp-4.2.6p5-29.el7.centos.2.x86_64 已安装并且是最新版本
2、启动ntpd
[root@localhost elasticsearch]# systemctl start ntpd [root@localhost elasticsearch]# systemctl enable ntpd #列显示了 NTP 服务器的 IP 地址或主机名 [root@localhost elasticsearch]# ntpq -p remote refid st t when poll reach delay offset jitter ============================================================================== 119.28.206.193 .STEP. 16 u 614 64 0 0.000 0.000 0.000 +ntp.ams1.nl.lea 130.133.1.10 2 u 23 64 1 211.185 -1.552 6.721 +ntp1.flashdance 194.58.202.20 2 u 57 64 1 257.396 0.792 0.827 *electrode.felix 131.188.3.221 2 u 55 64 1 184.682 6.590 0.424
3、修改ntp配置文件
vim /etc/ntp.conf #同步阿里云时间 #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 ntp.aliyun.com iburst #重启服务 systemctl restart ntpd
4、203.107.6.88 就是阿里云的ntp服务器的ip地址了
[root@localhost elasticsearch]# ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
*203.107.6.88 100.107.25.114 2 u 20 64 1 29.587 6.472 0.839
(图片来源网络,侵删)
(图片来源网络,侵删)
(图片来源网络,侵删)
免责声明:我们致力于保护作者版权,注重分享,被刊用文章因无法核实真实出处,未能及时与作者取得联系,或有版权异议的,请联系管理员,我们会立即处理! 部分文章是来自自研大数据AI进行生成,内容摘自(百度百科,百度知道,头条百科,中国民法典,刑法,牛津词典,新华词典,汉语词典,国家院校,科普平台)等数据,内容仅供学习参考,不准确地方联系删除处理! 图片声明:本站部分配图来自人工智能系统AI生成,觅知网授权图片,PxHere摄影无版权图库和百度,360,搜狗等多加搜索引擎自动关键词搜索配图,如有侵权的图片,请第一时间联系我们。