私はBeaglebone Blackで正しい日付を設定しようとしていましたが、私が試した解決策はBeagleの電源を切って後で電源を入れるたびに永続的ではありません。日付は再び間違っています。 これは、最初は次のようになります。そして、私はこのntpを使ってBegalebone Blackの日付を設定する8.9
# pool.ntp.org maps to about 1000 low-stratum NTP servers. Your server will
# pick a different set every time it starts up. Please consider joining the
# pool: <http://www.pool.ntp.org/join.html>
server 0.north-america.pool.ntp.org
server 1.north-america.pool.ntp.org
server 2.north-america.pool.ntp.org
server 3.north-america.pool.ntp.org
...
# Clients from this (example!) subnet have unlimited access, but only if
# cryptographically authenticated.
#restrict 192.168.123.0 mask 255.255.255.0 notrust
restrict 192.168.0.11 mask 255.255.255.0 nomodify notrap
次のステップのようなのntp.confファイルを編集して、NTPとのntpdate
その後[email protected]:~# apt-get install ntp ntpdate
Reading package lists... Done
Building dependency tree
Reading state information... Done
ntp is already the newest version.
ntpdate is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
をインストール
[email protected]:~# date
Sat May 21 17:48:28 CDT 2016
は
[email protected]:~# rm /etc/localtime
[email protected]:~# ln -s /usr/share/zoneinfo/America/Mexico_City /etc/localtime
は、その後、私は私が最後にこの
[email protected]:~# timedatectl set-ntp true
[email protected]:~# timedatectl status
Local time: Sat 2016-05-21 18:16:10 CDT
Universal time: Sat 2016-05-21 23:16:10 UTC
RTC time: Sat 2016-05-21 23:16:11
Time zone: America/Mexico_City (CDT, -0500)
Network time on: yes
NTP synchronized: yes
RTC in local TZ: no
[email protected]:~# nano /etc/systemd/timesyncd.conf
[Time]
NTP=0.north-america.pool.ntp.org 1.north-america.pool.ntp.org 2.north-america.pool.ntp.org 3.north-america.pool.ntp.org
FallbackNTP=0.debian.pool.ntp.org 1.debian.pool.ntp.org 2.debian.pool.ntp.org 3.debian.pool.ntp.org
を試してみました私は、その後ntp.serviceファイルを持っていないので、thas私は続けることができませんでした
[email protected]:~# systemctl enable ntpdate.service
Failed to enable unit: No such file or directory
or
[email protected]:~# service ntpdate start
Failed to start ntpdate.service: Unit ntpdate.service not found.
とNTPサービスを有効になっていました電源オフ時には、私がしても設定してみましたとhwclockの--set --dateを使って手動でクロックを同期バック月21日、2016年に自身を設定した後、私は、再起動し、再び
[email protected]:~# timedatectl status
Local time: Sun 2017-09-10 23:32:28 CDT
Universal time: Mon 2017-09-11 04:32:28 UTC
RTC time: Mon 2017-09-11 04:32:28
Time zone: America/Mexico_City (CDT, -0500)
Network time on: yes
NTP synchronized: yes
RTC in local TZ: no
を動作しますが、ように見えます"date" --localtimeとsystohcですが、電源切断後の結果は同じです。
何か不足しているか間違っていますか?
は、私はまたの/ etc/adjtimeに 'LOCAL' から 'UTC' を変更すると時間が月2016
おかげに戻ります。これは動作するはず
のdpkg-再設定のtzdata
:
試してみて、うまくいきませんでした。私は質問に記載した手順でタイムゾーンを設定しますが、まだ起動時にリセットされます。 –
ああ...申し訳ありません。わかったら、私はあなたに戻ってきます。 –