時刻がズレるとログが訳わからなくなるので、ここらで時刻合わせを行う
|
|
|
|
|
|
|
|
tce-load -wi ntpclient
|
|
|
|
|
確認してみる
|
|
|
|
|
|
sudo ntpclient -h NTPサーバ -s
|
|
|
|
date
|
|
|
|
|
|
|
|
|
|
|
|
|
|
編集する
|
|
|
|
|
|
|
vi /opt/crontab
|
|
|
|
|
|
SHELL=/bin/bash
|
|
|
|
|
|
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin
|
|
MAILTO=
|
|
|
|
|
|
|
HOME=/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
0 1 * * * ntpclient -h NTPサーバ -s
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
永続化する
|
|
|
|
|
|
sudo su
|
|
|
|
|
|
|
|
|
|
|
|
|
|
root@box:/opt#
cat bootlocal.sh
|
|
|
|
#!/bin/sh
|
|
|
|
|
|
# put ot
her system startup commands here
|
|
|
|
|
|
|
sh /opt/eth0.sh
|
|
|
|
|
|
sh /opt/userAppend.sh
|
|
|
|
|
sh /opt/env/srv/php.sh
|
|
|
|
|
/usr/local/bin/ntpclient -h NTP
サーバ
-s
|
|
|
sh /opt/env/srv/openssh.sh
|
|
|
|
|
sh /opt/env/srv/nginx.sh
|
|
|
|
|
crond /opt/crontab
|
|
|
|
|
root@box:/opt#
|
|
|
|
|
|
![IF>
|
|
|
|
|
|
|
![ENDIF]>