ntp
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| ntp [2018/05/06 07:52] – 创建 midas_zhou | ntp [2025/10/14 06:22] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| NTP(Network Time Protocol,网络时间协议)是通过网络来同步时间的一种协议,网络时间由NTP服务器来提供。 通过修改配置文件/ | NTP(Network Time Protocol,网络时间协议)是通过网络来同步时间的一种协议,网络时间由NTP服务器来提供。 通过修改配置文件/ | ||
| - | config system | + | config system |
| option hostname Widora32 | option hostname Widora32 | ||
| option timezone CST-8 | option timezone CST-8 | ||
| - | + | config timeserver ntp | |
| - | config timeserver ntp | + | list server |
| + | list server | ||
| + | list server | ||
| + | list server | ||
| list server | list server | ||
| list server | list server | ||
| Line 14: | Line 17: | ||
| 各选项说明: | 各选项说明: | ||
| - | timezone | + | timezone |
| list server | list server | ||
| - | enabled | + | enabled |
| - | enable_server | + | enable_server |
| 如果ntpd未启动,依次执行下面的命令来启动: | 如果ntpd未启动,依次执行下面的命令来启动: | ||
| - | / | + | / |
| - | / | + | |
| + | |||
| + | 如果你需要立即同步时间,那么直接执行ntpd命令,比如: | ||
| + | ntpd -n -d -q -p 1.cn.pool.ntp.org | ||
| + | 连接NTP服务器和同步时间可能需要等待一些时间, | ||
| + | {{: | ||
| - | 连接NTP服务器可能需要等待一些时间, | + | 最后执行date命令查看当前时间。 |
ntp.1525593145.txt.gz · Last modified: (external edit)
