| 1 2 | adachin-docker ~ $ date Thu Apr 27 01:12:57 UTC 2017 | 
あれ、またUTCになっとる。
この前設定してあげたのだが。。。
以下のやり方だと.profileを読み込ませるだけなので、
CoreOSのドキュメントを読んでみた。
(最初から公式を嫁!)
http://qiita.com/tukiyo3/items/969af2cdbbd0d20ab0fd
■CoreOSのバージョン
| 1 2 3 4 5 6 7 8 9 10 | adachin-docker ~ $ cat /etc/os-release NAME="Container Linux by CoreOS" ID=coreos VERSION=1298.7.0 VERSION_ID=1298.7.0 BUILD_ID=2017-03-31-0215 PRETTY_NAME="Container Linux by CoreOS 1298.7.0 (Ladybug)" ANSI_COLOR="38;5;75" HOME_URL="https://coreos.com/" BUG_REPORT_URL="https://github.com/coreos/bugs/issues" | 
■Configuring date and time zone
https://coreos.com/os/docs/latest/configuring-date-and-timezone.html
| 1 2 3 4 5 6 7 8 | adachin-docker ~ $ timedatectl status  Local time: Thu 2017-04-27 01:49:05 UTC  Universal time: Thu 2017-04-27 01:49:05 UTC  RTC time: Thu 2017-04-27 01:49:05  Time zone: UTC (UTC, +0000)  Network time on: no NTP synchronized: yes  RTC in local TZ: no | 
おおおNetworkがNewyorkに見えたw
| 1 2 | adachin-docker ~ $ timedatectl list-timezones |grep Tokyo Asia/Tokyo | 
timrdatectlのlistコマンドで世界のtimezoneが出てきた。
Aisia/Tokyoにしてあげよう。
| 1 2 3 4 5 6 7 8 9 10 11 12 | adachin-docker ~ $ sudo timedatectl set-timezone Asia/Tokyo adachin-docker ~ $ timedatectl status  Local time: Thu 2017-04-27 10:52:29 JST  Universal time: Thu 2017-04-27 01:52:29 UTC  RTC time: Thu 2017-04-27 01:52:29  Time zone: Asia/Tokyo (JST, +0900)  Network time on: no NTP synchronized: yes  RTC in local TZ: no adachin-docker ~ $ date Thu Apr 27 10:52:35 JST 2017 | 
でけた。
■まとめ
結構簡単だった。
が!
ntpとか動いてるのかなと確認してみた。
| 1 2 3 4 | adachin-docker ~ $ systemctl status ntpd ● ntpd.service - Network Time Service  Loaded: loaded (/usr/lib/systemd/system/ntpd.service; disabled; vendor preset: disabled)  Active: inactive (dead) | 
dead!
なので自動起動してやった。
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | adachin-docker ~ $ sudo systemctl enable ntpd Created symlink /etc/systemd/system/multi-user.target.wants/ntpd.service → /usr/lib/systemd/system/ntpd.service. adachin-docker ~ $ sudo systemctl start ntpd adachin-docker ~ $ systemctl status ntpd ● ntpd.service - Network Time Service  Loaded: loaded (/usr/lib/systemd/system/ntpd.service; enabled; vendor preset: disabled)  Active: active (running) since Thu 2017-04-27 11:05:29 JST; 3s ago  Main PID: 14546 (ntpd)  Tasks: 2  Memory: 3.4M  CPU: 13ms  CGroup: /system.slice/ntpd.service  ├─14546 /usr/sbin/ntpd -g -n -f /var/lib/ntp/ntp.drift -u ntp:ntp  └─14574 /usr/sbin/ntpd -g -n -f /var/lib/ntp/ntp.drift -u ntp:ntp Apr 27 11:05:29 adachin-docker ntpd[14546]: Listen normally on 11 vethe557afb [fe80::7809:71ff:fe63:bbef%9]:123 Apr 27 11:05:29 adachin-docker ntpd[14546]: Listen normally on 12 vethfda734c [fe80::549b:6eff:fe9b:11b0%11]:123 Apr 27 11:05:29 adachin-docker ntpd[14546]: Listen normally on 13 veth38b2fb8 [fe80::5847:6aff:fe33:b2a%13]:123 Apr 27 11:05:29 adachin-docker ntpd[14546]: Listen normally on 14 vethf47ec3d [fe80::c6b:46ff:fe07:64d1%15]:123 Apr 27 11:05:29 adachin-docker ntpd[14546]: Listen normally on 15 veth9bd46ab [fe80::ac27:92ff:fe2c:9cc1%17]:123 Apr 27 11:05:29 adachin-docker ntpd[14546]: Listen normally on 16 vethb28671d [fe80::d44b:cfff:fe93:7fd0%19]:123 Apr 27 11:05:29 adachin-docker ntpd[14546]: Listen normally on 17 veth08fa7c9 [fe80::f477:a6ff:fe0c:e229%23]:123 Apr 27 11:05:29 adachin-docker ntpd[14546]: Listen normally on 18 vetha178035 [fe80::60c2:dbff:fe03:3818%25]:123 Apr 27 11:05:29 adachin-docker ntpd[14546]: Listen normally on 19 veth7e3b1f3 [fe80::8a3:fcff:fe4c:c0f3%27]:123 Apr 27 11:05:29 adachin-docker ntpd[14546]: Listening on routing socket on fd #36 for interface updates adachin-docker ~ $ date Thu Apr 27 11:05:39 JST 2017 | 
これで大丈夫そう。
そういえばdockerサーバ復旧して、
サブドメインも変えました。
http://docker.adachin.me:3000/
 
													 
													 
													
0件のコメント