Skip to content

Commit 27536d2

Browse files
committed
格式修改
1 parent 870f120 commit 27536d2

File tree

4 files changed

+28
-29
lines changed

4 files changed

+28
-29
lines changed

NetTools/dig.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
## 一、nslookup
66

7-
>nslookup is a tried and true program that has weathered the ages. nslookup has been deprecated and may be removed from future releases. There is not even a man page for this program.
7+
> nslookup is a tried and true program that has weathered the ages. nslookup has been deprecated and may be removed from future releases. There is not even a man page for this program.
88
99
因此,这里不过多介绍。
1010

@@ -85,7 +85,7 @@ version.bind descriptive text "9.8.1-P2"
8585
Usage: host [-aCdlriTwv] [-c class] [-N ndots] [-t type] [-W time]
8686
[-R number] [-m flag] hostname [server]
8787
-a is equivalent to -v -t ANY
88-
-c specifies query class for non-IN data 搜索非网络数据时要指定要查找的类
88+
-c specifies query class for non-IN data # 搜索非网络数据时要指定要查找的类
8989
-C compares SOA records on authoritative nameservers
9090
-d is equivalent to -v
9191
-l lists all hosts in a domain, using AXFR
@@ -94,9 +94,9 @@ Usage: host [-aCdlriTwv] [-c class] [-N ndots] [-t type] [-W time]
9494
-r disables recursive processing
9595
-R specifies number of retries for UDP packets
9696
-s a SERVFAIL response should stop query
97-
-t specifies the query type 指定要查询的记录类型
97+
-t specifies the query type # 指定要查询的记录类型
9898
-T enables TCP/IP mode
99-
-v enables verbose output 输出更详细的信息
99+
-v enables verbose output # 输出更详细的信息
100100
-w specifies to wait forever for a reply
101101
-W specifies how long to wait for a reply
102102
-4 use IPv4 query transport only
@@ -106,7 +106,7 @@ Usage: host [-aCdlriTwv] [-c class] [-N ndots] [-t type] [-W time]
106106

107107
## 三、dig
108108

109-
`dig` 也是一个很强大的命令,相对host来说输出较为繁杂,如下:
109+
`dig` 也是一个很强大的命令,相对 host 来说输出较为繁杂,如下:
110110

111111
```
112112
$ dig www.google.com

PerformanceTools/top.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ Swap: 1044476k total, 713552k used, 330924k free, 10052032k cached
4141
|内容 | 解释
4242
|:--- |:---
4343
|Mem: 16435896k total, 16232468k used, | 分别是物理内存总量、使用物理内存总量
44-
|:--- |:---
4544
|203428k free, 58004k buffers | 空闲内存总量、用作内核缓存内存量
4645
|Swap: 1044476k total, 713552k used, | 分别是交换分区量、使用交换分区总量
4746
|330924k free, 10052032k cached | 空闲交换区总量、缓存交换区总量

Services/NTP.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@
33

44
Network Time Protocol(NTP) 是用来使计算机时间同步化的一种协议,它可以使计算机对其服务器或时钟源(如石英钟,GPS 等等)做同步化,它可以提供高精准度的时间校正(LAN 上与标准间差小于1毫秒,WAN上几十毫秒),且可使用加密确认的方式来防止恶毒的协议攻击。默认使用 `UDP 123端口`
55

6-
NTP 提供准确时间,首先需要一个准确的UTC时间来源,NTP 获得 UTC 的时间来源可以从原子钟、天文台、卫星,也可从 Internet 上获取。时间服务器按照 NTP 服务器的等级传播,根据离外部 UTC 源的远近将所有服务器归入不用的层 (Stratum) 中。Stratum-1 在顶层由外部 UTC 接入,stratum-1 的时间服务器为整个系统的基础,Stratum 的总数限制在 15 以内。下图为 NTP 层次图:
6+
NTP 提供准确时间,首先需要一个准确的 UTC 时间来源,NTP 获得 UTC 的时间来源可以从原子钟、天文台、卫星,也可从 Internet 上获取。时间服务器按照 NTP 服务器的等级传播,根据离外部 UTC 源的远近将所有服务器归入不用的层 (Stratum) 中。Stratum-1 在顶层由外部 UTC 接入,stratum-1 的时间服务器为整个系统的基础,Stratum 的总数限制在 15 以内。下图为 NTP 层次图:
77

88
<center><img src="/images/Network_Time_Protocol_servers_and_clients.png" alt="ntp" title="ntp" width="400" /></center>
99

1010
## 二、NTP Server 安装配置
1111

12-
关于 NTP 服务器的安装,根据不同版本安装方法也不同。REDHAT 系统则可以使用 yum 安装,Ubuntu 系列可以使用 apt-get 安装,这里不做具体的介绍,主要详细介绍配置文件的信息。
12+
关于 NTP 服务器的安装,根据不同版本安装方法也不同。REDHAT 系统则可以使用 yum 安装,Ubuntu 系列可以使用 `apt-get` 安装,这里不做具体的介绍,主要详细介绍配置文件的信息。
1313

1414
对于 Centos 过滤注释和空行后,ntp 配置文件内容如下
1515

16-
``` bash
16+
```
1717
# grep -vE '^#|^$' /etc/ntp.conf
1818
driftfile /var/lib/ntp/drift
1919
restrict default kod nomodify notrap nopeer noquery
@@ -29,27 +29,27 @@ keys /etc/ntp/keys
2929

3030
### 2.1 配置选项说明
3131

32-
* `driftfile` 选项, 则指定了用来保存系统时钟频率偏差的文件。 ntpd程序使用它来自动地补偿时钟的自然漂移, 从而使时钟即使在切断了外来时源的情况下, 仍能保持相当的准确度。另外,driftfile 选项也保存上一次响应所使用的 NTP 服务器的信息。 这个文件包含了 NTP 的内部信息, 它不应被任何其他进程修改。`无需更改`
33-
* `restrict default kod nomodify notrap nopeer noquery` 默认拒绝所有NTP客户端的操作restrict <IP 地址> <子网掩码>|<网段> [ignore|nomodiy|notrap|notrust|nknod] 指定可以通信的IP地址和网段。如果没有指定选项,表示客户端访问NTP服务器没有任何限制
32+
* `driftfile` 选项, 则指定了用来保存系统时钟频率偏差的文件。 ntpd 程序使用它来自动地补偿时钟的自然漂移, 从而使时钟即使在切断了外来时源的情况下, 仍能保持相当的准确度。另外,driftfile 选项也保存上一次响应所使用的 NTP 服务器的信息。 这个文件包含了 NTP 的内部信息, 它不应被任何其他进程修改。`无需更改`
33+
* `restrict default kod nomodify notrap nopeer noquery` 默认拒绝所有NTP客户端的操作 [ restrict <IP 地址> <子网掩码>|<网段> [ignore|nomodiy|notrap|notrust|nknod ] 指定可以通信的IP地址和网段。如果没有指定选项,表示客户端访问NTP服务器没有任何限制
3434
* `ignore`: 关闭所有 NTP 服务
3535
* `nomodiy`: 表示客户端不能更改 NTP 服务器的时间参数,但可以通过 NTP 服务器进行时间同步
3636
* `notrust`: 拒绝没有通过认证的客户端
3737
* `knod`: kod 技术科阻止 "Kiss of Death" 包(一种 DOS 攻击)对服务器的破坏,使用 knod 开启功能
3838
* `nopeer`: 不与其它同一层的 NTP 服务器进行同步
39-
* `server [IP|FQDN|prefer]`指该服务器上层 NTP Server,使用prefer的优先级最高,没有使用 prefer 则按照配置文件顺序由高到低,默认情况下至少 15min 和上层 NTP 服务器进行时间校对
40-
* `fudge`: 可以指定本地NTP Server层,如`fudge 127.0.0.1 stratum 9`
39+
* `server [IP|FQDN|prefer]`指该服务器上层 NTP Server,使用 prefer 的优先级最高,没有使用 prefer 则按照配置文件顺序由高到低,默认情况下至少 15min 和上层 NTP 服务器进行时间校对
40+
* `fudge`: 可以指定本地 NTP Server 层,如 `fudge 127.0.0.1 stratum 9`
4141
* `broadcast 网段 子网掩码`: 指定 NTP 进行时间广播的网段,如`broadcast 192.168.1.255`
4242
* `logfile`: 可以指定 NTP Server 日志文件
4343

44-
几个与NTP相关的配置文件:`/usr/share/zoneinfo/``/etc/sysconfig/clock``/etc/localtime`
44+
几个与NTP相关的配置文件:` /usr/share/zoneinfo/``/etc/sysconfig/clock``/etc/localtime`
4545

4646
* `/usr/share/zoneinfo/`: 存放时区文件目录
4747
* `/etc/sysconfig/clock`: 指定当前系统时区信息
4848
* `/etc/localtime`: 相应的时区文件
4949

5050
如果需要修改当前时区,则可以从 /usr/share/zoneinfo/ 目录拷贝相应时区文件覆盖 /etc/localtime 并修改 /etc/sysconfig/clock 即可
5151

52-
``` bash
52+
```
5353
cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
5454
sed -i 's:ZONE=.*:ZONE="Asia/Shanghai":g' /etc/sysconfig/clock
5555
```
@@ -58,16 +58,16 @@ sed -i 's:ZONE=.*:ZONE="Asia/Shanghai":g' /etc/sysconfig/clock
5858

5959
`ntpstat` 查看同步状态
6060

61-
``` bash
61+
```
6262
# ntpstat
6363
synchronised to NTP server (192.168.0.18) at stratum 4
64-
time correct to within 88 ms #表面时间校正88ms
65-
polling server every 1024 s #每隔1024s更新一次
64+
time correct to within 88 ms # 表面时间校正 88ms
65+
polling server every 1024 s # 每隔 1024s 更新一次
6666
```
6767

6868
`ntpq` 列出上层状态
6969

70-
``` bash
70+
```
7171
# ntpq -np
7272
remote refid st t when poll reach delay offset jitter
7373
==============================================================================
@@ -90,6 +90,6 @@ synchronised to NTP server (192.168.0.18) at stratum 4
9090

9191
## 四、参考文档
9292

93-
* [NTP百度百科](http://baike.baidu.com/view/60648.htm)
94-
* [NTP维基百科](http://en.wikipedia.org/wiki/Network_Time_Protocol)
95-
* 鸟哥Linux私房菜
93+
* [ NTP 百度百科](http://baike.baidu.com/view/60648.htm)
94+
* [ NTP 维基百科](http://en.wikipedia.org/wiki/Network_Time_Protocol)
95+
* 鸟哥 Linux 私房菜

Services/openvpn.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# openvpn基本搭建实例
1+
# OpenVPN 基本搭建实例
22

33
OpenVPN 是一个用于创建虚拟专用网络加密通道的软件包,最早由 James Yonan 编写。OpenVPN 允许创建的 VPN 使用公开密钥、电子证书、或者用户名/密码来进行身份验证。
44

@@ -8,23 +8,23 @@ OpenVPN 是一个用于创建虚拟专用网络加密通道的软件包,最早
88

99
本例以 CentOS 6 为例
1010

11-
* [openvpn-2.3.1](http://swupdate.openvpn.org/community/releases/openvpn-2.3.1.tar.gz)
12-
* [lzo-2.06](http://www.oberhumer.com/opensource/lzo/download/lzo-2.06.tar.gz)
13-
* [最新版本的 openvpn-2.3.1 官方不再集成`easy-rsa`] Note that easy-rsa is no longer bundled with OpenVPN source code archives. To get it, visit the easy-rsa page on GitHub, or download it from our Linux software repositories.
11+
* [ openvpn-2.3.1 ](http://swupdate.openvpn.org/community/releases/openvpn-2.3.1.tar.gz)
12+
* [ lzo-2.06 ](http://www.oberhumer.com/opensource/lzo/download/lzo-2.06.tar.gz)
13+
* [ 最新版本的 openvpn-2.3.1 官方不再集成 `easy-rsa` ] Note that easy-rsa is no longer bundled with OpenVPN source code archives. To get it, visit the easy-rsa page on GitHub, or download it from our Linux software repositories.
1414

1515
```
1616
git clone https://github.com/OpenVPN/easy-rsa
1717
```
1818

1919
## 二、软件安装
2020

21-
`openssl``openssl-devel``pam``pam-devel`安装
21+
`openssl``openssl-devel``pam``pam-devel` 安装
2222

2323
```
2424
yum install openssl openssl-devel pam pam-devel -y
2525
```
2626

27-
`lzo-2.06` 安装,下载相应软件包编译安装即可
27+
`lzo-2.06` 安装下载相应软件包编译安装即可
2828

2929
```
3030
./configure && make && make install
@@ -355,7 +355,7 @@ comp-lzo
355355
verb 3
356356
```
357357

358-
拷贝 Server 端生成的如下客户端证书到Linux客户端 /etc/openvpn 下(这里为了方便不再生成一套客户端证书了)
358+
拷贝 Server 端生成的如下客户端证书到 Linux 客户端 /etc/openvpn 下(这里为了方便不再生成一套客户端证书了)
359359

360360
* kumu_client1.crt
361361
* kumu_client1.key

0 commit comments

Comments
 (0)