NICT、日本標準時のNTPサーバーをJPIXに設置 を読んだ。 ふと見ると、机の上に置いてある電波時計の時間とパネル上に表示されている時間が二分ずれていた。 いけませんね…
ということで ntp を設定。
まずは設定ファイルを確認。雛形はありますが、ntp.conf 自体は存在せず。
$ ls -l /etc/inet/ntp.* -rw-r--r-- 1 root sys 4427 10月 23 17:48 /etc/inet/ntp.client -rw-r--r-- 1 root sys 4856 10月 23 17:48 /etc/inet/ntp.server
そこで、ntp.client を ntp.conf に複写し、編集。
$ pfexec cp /etc/inet/ntp.{client,conf}
$ pfexec vi /etc/inet/ntp.conf
$ diff /etc/inet/ntp.{client,conf}
51c51,52
< server server_name iburst
---
> #server server_name iburst
> server ntp.nict.jp iburst
そして、サービスを起動。ついでに動作していることを確認。
$ svcadm enable ntp
$ svcs ntp
STATE STIME FMRI
online 13:45:04 svc:/network/ntp:default
$ ps -fe | grep ntp
root 5159 1 0 13:45:04 ? 0:00 /usr/lib/inet/ntpd -p /var/run/ntp.pid -g
数分後には、無事時計が同期されました。めでたし。
0 件のコメント:
コメントを投稿