diff --git a/NTP.md b/NTP.md new file mode 100644 index 00000000..2d6a6607 --- /dev/null +++ b/NTP.md @@ -0,0 +1,41 @@ +

NTP(Network Time Protocol)介绍

+ +------ + +* [NTP(Network Time Protocol)介绍](#ntp0) + * [NTP 安装](#ntp1) + * [NTP 服务器配置文件常用参数](#ntp2) + * [NTP 资料](#ntp3) + +------ + +

NTP 安装

+ +- 查看是否已安装: + - CentOS:`rpm -qa | grep ntp-*` + - Ubuntu:`dpkg -l | grep ntp-*` + +- 安装: + - CentOS 6:`sudo yum install -y ntp` + - Ubuntu:`sudo apt-get install -y ntp` + +

NTP 服务器配置文件常用参数

+ +- 世界上可以校对时间节点: +- 中国时间校对服务器节点: +- 配置文件介绍:`sudo vim /etc/ntp.conf` + - ![NTP 服务器配置文件常用参数](images/NTP-a-1.jpg) + - 该配置解释: + - 标注 1 是默认内容,我们这里进行了注释。 + - 标注 2 是新增内容,表示使用中国时间校对服务器节点地址。 +- 启动服务: + - `sudo service ntpd start` +- 服务加到启动项 + - `sudo apt-get install -y sysv-rc-conf ` + - `sudo sysv-rc-conf ntpd on` + +

NTP 资料

+ +- +- +- diff --git a/Ubuntu.md b/Ubuntu.md index 091fb318..e1ce5544 100644 --- a/Ubuntu.md +++ b/Ubuntu.md @@ -240,6 +240,14 @@ find / -name 文件名(文件名可以用使用通配符) --- +> NTP(Network Time Protocol) +- 介绍: +- 安装:`sudo apt-get install -y ntp` +- 资料: + - [NTP 常用功能](NTP.md) + +--- + diff --git a/images/NTP-a-1.jpg b/images/NTP-a-1.jpg new file mode 100644 index 00000000..696a76c4 Binary files /dev/null and b/images/NTP-a-1.jpg differ