Jump to content

Search the Community

Showing results for tags 'ntpd'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Keenetic Community
    • Keenetic Development
    • Keenetic Community Support
    • KeeneticOS Testing
    • Mobile App
  • Open Package Support
    • Opkg Help
    • Opkg Cookbook
    • Opkg Cookbook RUS

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Location


Web-site


Interests


Occupation


AOL Account


ICQ Account


WLM


YAHOO


Facebook Account


Twitter Account


Skype Account


Youtube Account


Google+ Account


Keenetic

Found 1 result

  1. Установка и настройка ntpd ntpd - The ISC ntp suite is a collection of tools used to synchronize the system clock with remote NTP time servers and run/monitor local NTP servers. Версия из репозитория ntpd - 4.2.8p10-1 1. Устанавливаем Entware-3x 2. Заходим через SSH в настройки роутера и прописываем: ~ # opkg update Downloading http://entware-3x.zyxmon.org/binaries/mipsel/Packages.gz Updated list of available packages in /opt/var/opkg-lists/keen3x ~ # opkg install ntp-utils Installing ntp-utils (4.2.8p10-1) to root... Downloading http://entware-3x.zyxmon.org/binaries/mipsel/ntp-utils_4.2.8p10-1_mipsel-3x.ipk Installing libcap (2.25-1) to root... Downloading http://entware-3x.zyxmon.org/binaries/mipsel/libcap_2.25-1_mipsel-3x.ipk Configuring libcap. Configuring ntp-utils. ~ # opkg install ntpd Installing ntpd (4.2.8p10-1) to root... Downloading http://entware-3x.zyxmon.org/binaries/mipsel/ntpd_4.2.8p10-1_mipsel-3x.ipk Configuring ntpd. ~ # opkg install ntp-keygen Installing ntp-keygen (4.2.8p10-1) to root... Downloading http://entware-3x.zyxmon.org/binaries/mipsel/ntp-keygen_4.2.8p10-1_mipsel-3x.ipk Installing libevent2-core (2.0.22-1) to root... Downloading http://entware-3x.zyxmon.org/binaries/mipsel/libevent2-core_2.0.22-1_mipsel-3x.ipk Configuring libevent2-core. Configuring ntp-keygen. ~ # opkg install ntpdate Installing ntpdate (4.2.8p10-1) to root... Downloading http://entware-3x.zyxmon.org/binaries/mipsel/ntpdate_4.2.8p10-1_mipsel-3x.ipk Configuring ntpdate. 3. Смотрим путь установочных файлов ntpd: ~ # opkg files ntpd Package ntpd (4.2.8p10-1) is installed on root and has the following files: /opt/etc/ntp.conf /opt/sbin/ntpd /opt/sbin/ntpq /opt/etc/init.d/S77ntpd /opt/etc/hotplug.d/iface/20-ntpd нам нужен /opt/etc/init.d/S77ntpd 4. Запускаем S77ntpd: ~ # /opt/etc/init.d/S77ntpd start Starting ntpd... done. 5. Останавливаем S77ntpd: ~ # /opt/etc/init.d/S77ntpd stop Checking ntpd... alive. Shutting down ntpd... done. 6. Редактируем конфиг /opt/etc/ntp.conf: Оригинальный конфиг: # use a random selection of 4 public stratum 2 servers # see http://twiki.ntp.org/bin/view/Servers/NTPPoolServers #restrict default nomodify notrap noquery #restrict default noquery restrict 127.0.0.1 driftfile /opt/var/lib/ntp/ntp.drift server 0.openwrt.pool.ntp.org iburst server 1.openwrt.pool.ntp.org iburst server 2.openwrt.pool.ntp.org iburst server 3.openwrt.pool.ntp.org iburst # GPS(NMEA)+PPS #server 127.127.20.0 minpoll 4 prefer #fudge 127.127.20.0 flag3 1 flag2 0 # SMA PPS #server 127.127.28.0 minpoll 4 prefer #fudge 127.127.28.0 refid PPS flag3 1 #server 192.168.1.253 Меняем конфиг /opt/etc/ntp.conf: # use a random selection of 4 public stratum 2 servers # see http://twiki.ntp.org/bin/view/Servers/NTPPoolServers #ignore restrict default ignore #permit restrict 127.0.0.1 restrict 127.127.1.0 #restrict noquery notrap restrict ntp2.stratum2.ru noquery notrap restrict ntp3.stratum2.ru noquery notrap restrict ntp4.stratum2.ru noquery notrap #local host restrict 192.168.200.0 mask 255.255.255.0 nomodify notrap nopeer #server ntp server 127.127.1.0 iburst server ntp2.stratum2.ru iburst prefer server ntp3.stratum2.ru iburst server ntp4.stratum2.ru iburst #block restrict −4 default kod notrap nomodify nopeer noquery restrict −6 default kod notrap nomodify nopeer noquery #files driftfile /opt/var/spool/ntp/ntp.drift logfile /opt/share/log/ntp 7. Запускаем S77ntpd: ~ # /opt/etc/init.d/S77ntpd start Starting ntpd... done. 8. Проверяем работу NTP-серверов: ~ # ntpq -p remote refid st t when poll reach delay offset jitter ============================================================================== LOCAL(0) .LOCL. 5 l 28 64 1 0.000 0.000 0.004 *n1.sigma.d6.hsd 88.147.254.228 2 u 16 64 1 24.394 3.070 2.151 +ns5.hsdn.org 255.233.161.33 2 u 18 64 1 22.982 -1.106 3.382 +91.226.136.155 35.122.95.18 2 u 18 64 1 27.698 -0.482 1.653 ~ # 9, Проверяем работу локального NTP-сервера в клиенте, например Windows 10: Жмем Win+R, в окне вводим timedate.cpl и далее вписываем ип адрес Домашней сети (Home VLAN) Дополнительная информация по настройке - тут, тут2, тут3. NTP-сервера брал - тут. Вы можете указать другие NTP-сервера - отсюда.
×
×
  • Create New...