您现在的位置是:主页 > news > 遂宁网站开发/技能培训

遂宁网站开发/技能培训

admin2025/6/8 22:21:11news

简介遂宁网站开发,技能培训,安康市建设规划局网站,秦皇岛做网站的公司选汉狮centos7 搭建ntp时钟服务器 服务器配置 # 关闭防火墙,selinuxdisabled1.# 服务器部署 [rootlocalhost ~]# yum -y install ntp ntpdate2.# 查找时间同步服务器 https://www.pool.ntp.org/zone/cn3.# 修改配置文件 [rootlocalhost ~]# mv /etc/ntp.conf{,.bak} …

遂宁网站开发,技能培训,安康市建设规划局网站,秦皇岛做网站的公司选汉狮centos7 搭建ntp时钟服务器 服务器配置 # 关闭防火墙,selinuxdisabled1.# 服务器部署 [rootlocalhost ~]# yum -y install ntp ntpdate2.# 查找时间同步服务器 https://www.pool.ntp.org/zone/cn3.# 修改配置文件 [rootlocalhost ~]# mv /etc/ntp.conf{,.bak} …

centos7 搭建ntp时钟服务器

服务器配置

# 关闭防火墙,selinux=disabled
1.# 服务器部署
[root@localhost ~]# yum -y install ntp ntpdate
2.# 查找时间同步服务器
https://www.pool.ntp.org/zone/cn
3.# 修改配置文件
[root@localhost ~]# mv /etc/ntp.conf{,.bak}    # 操作之前先备份
[root@localhost ~]# vim /etc/ntp.conf
server 0.asia.pool.ntp.org
server 1.asia.pool.ntp.org
server 2.asia.pool.ntp.org
server 3.asia.pool.ntp.org
server  127.127.1.0  iburst     local  clock     # 当外部时间不可用时,使用本地时间
restrict 192.168.57.2 mask 255.255.255.0 nomodify   # 允许更新的ip地址段
4.# 启动ntp服务
[root@localhost ~]# systemctl enable ntpd --now   # 设为开机启动,并立刻启动服务
5.# 本机测试
[root@localhost ~]# ntpq -premote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
+ntp.xtom.com.hk 223.255.185.3    3 u   22   64  377  400.607  881.589  52.922fayetteville.nc 132.163.96.2     2 u   94   64  102  434.297  818.850 118.333
*ntpblr.roothost 153.153.36.115   2 u   94   64  376  229.075  948.388  21.710ntp.nic.kz      .SHM.            1 u   22   64  237  410.958  781.042  20.402LOCAL(0)        .LOCL.           5 l  292   64  360    0.000    0.000   0.000

远程客户端配置

[root@localhost ~]# yum -y install ntpdate     # 远程客户端需要安装ntp客户端
[root@localhost ~]# ntpdate 192.168.57.130
30 Jun 21:48:45 ntpdate[24231]: adjust time server 192.168.57.130 offset 0.002109 sec