This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
сервис_ntp [2018/12/04 09:26] val |
сервис_ntp [2024/06/21 07:29] (current) val [Debian/Ubuntu] |
||
---|---|---|---|
Line 14: | Line 14: | ||
* [[https://www.pool.ntp.org/zone/ru|Russian Federation — ru.pool.ntp.org]] | * [[https://www.pool.ntp.org/zone/ru|Russian Federation — ru.pool.ntp.org]] | ||
- | * [[https://wiki.archlinux.org/index.php/Systemd-timesyncd_(%D0%A0%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9)|systemd-timesyncd (Русский)]] | + | * [[https://blog.programs74.ru/how-to-use-systemd-timesyncd/|Использование systemd-timesyncd для синхронизации времени в Debian/Ubuntu]] |
<code> | <code> | ||
Line 24: | Line 24: | ||
==== Debian/Ubuntu ==== | ==== Debian/Ubuntu ==== | ||
<code> | <code> | ||
+ | ubuntu24# apt remove systemd-timesyncd | ||
+ | |||
root@gate:~# apt install ntp | root@gate:~# apt install ntp | ||
</code> | </code> | ||
- | ==== FreeBSD ==== | ||
- | <code> | ||
- | [gate:~] # cat /etc/rc.conf | ||
- | ... | ||
- | ntpd_enable="YES" | ||
- | </code> | ||
- | ==== Debian/Ubuntu/FreeBSD ==== | + | ==== Debian/Ubuntu ==== |
<code> | <code> | ||
gate# cat /etc/ntp.conf | gate# cat /etc/ntp.conf | ||
Line 42: | Line 38: | ||
server 2.ru.pool.ntp.org | server 2.ru.pool.ntp.org | ||
server 3.ru.pool.ntp.org | server 3.ru.pool.ntp.org | ||
- | # server 127.127.1.1 | + | #restrict 127.0.0.1 |
+ | #restrict ::1 | ||
+ | #restrict 192.168.0.0 mask 255.255.0.0 | ||
+ | #server 127.127.1.1 | ||
+ | </code><code> | ||
+ | gate# service ntp restart | ||
</code> | </code> | ||
Через 5-10 минут проверяем: | Через 5-10 минут проверяем: | ||
<code> | <code> | ||
gate# ntpq -pn | gate# ntpq -pn | ||
+ | </code><code> | ||
+ | *128.0.142.251 ... | ||
+ | +193.192.36.3 ... | ||
+ | +188.225.9.167 ... | ||
+ | </code><code> | ||
+ | gate# watch ntptrace | ||
+ | |||
+ | gate# apt install ntpstat | ||
- | linux# ntptrace | + | gate# ntpstat |
</code> | </code> | ||