msの日記

久しぶりに勉強したくなりプログラミングをは始めてみる。

vagrant ,chef ,git を使いcakephpを立ち上げるまでの道のり。〜脱線〜

chef,gitは置いといてvagrantのみでcakephp起動までする。
cakephpのフォルダを設置する場所がわからない。

SHELL PROVISIONER

Provisioner name: "shell"

The shell provisioner allows you to upload and execute a script as the root user within the guest machine.

vagrantfile編集

Vagrant::Config.run do |config|
config.vm.box = "Cent64"
config.vm.provision :shell,:inline=> "echo Hello, World"
config.vm.network :hostonly, "192.168.22.33"

vagrantfileのディレクトリにprovision.shを配置。

yum -y install httpd
service httpd start
sudo chkconfig httpd on
sudo service iptables stop
sudo chkconfig iptables off