1查看服务器、客户端操作系统版本

linux篇-CentOS7搭建NTP服务器_centos

2查看服务器是否安装ntp

linux篇-CentOS7搭建NTP服务器_开机自启动_02

3如果没有安装

linux篇-CentOS7搭建NTP服务器_centos_03

4安装完成后重新查看服务器是否安装ntp

linux篇-CentOS7搭建NTP服务器_centos_04

5查看ntp服务器状态

linux篇-CentOS7搭建NTP服务器_centos_05

6修改配置文件

linux篇-CentOS7搭建NTP服务器_服务器_06

注释

#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 127.127.1.0 iburst

7启动ntp服务

linux篇-CentOS7搭建NTP服务器_centos_07

8查看状态

linux篇-CentOS7搭建NTP服务器_开机自启动_08

9查看是否同步

linux篇-CentOS7搭建NTP服务器_centos_09

10加入开机自启动

linux篇-CentOS7搭建NTP服务器_centos_10

11查看防火墙状态(本人日常需要部署程序,防火墙关闭)

linux篇-CentOS7搭建NTP服务器_开机自启动_11

12查看防火墙已打开端口

 linux篇-CentOS7搭建NTP服务器_开机自启动_12