Linux」カテゴリーアーカイブ

VagrantのBoxに、chefが入っていなかった

VagrantのBoxに、chefが入っていない場合に、自動的にchefをインストールする方法

まず、vagrantに自動インストーを行うプラグインを入れる。apt-getみたいな感じ?

vagrant plugin install vagrant-omnibus

次に、Vagrantfileに次の様な設定を追記

  config.omnibus.chef_version = :latest

あとは、Vagrantを立ち上げるか、再起動

サーバの時刻設定

サーバ(CentOS5.5)での時刻設定のまとめ

$ sudo yum install ntp

参照するNTPサーバを変える必要がある場合は、/etc/ntp.confを書き換え

$ sudo /usr/sbin/ntpdate ntp.nict.jp #最初に手動で時刻更新
$ sudo /etc/rc.d/init.d/ntpd start #サービスを起動
$ sudo /sbin/chkconfig ntpd on #自動起動設定

もし、Timezoneが日本になっていなかった場合

$ sudo cp /usr/share/zoneinfo/Japan /etc/localtime 
$ sudo date