月別アーカイブ: 2015年2月

homesteadのVMをもう一つ作る

Laravel5がきたので、検証用に新しくVMを作ろうとしたら、いろいろぶつかって、うまくいかなかった。
対処方法のメモ。

$ git clone https://github.com/laravel/homestead.git Homestead-l5
$ cd Homestead-l5
$ vi Homestead.yaml

---
ip: "192.168.11.10"
memory: 2048
cpus: 1
name: "homestead-l5"
hostname: "homestead-l5"

authorize: ~/.ssh/id_rsa.pub

keys:
    - ~/.ssh/id_rsa

folders:
    - map: (作業フォルダ)
      to: /home/vagrant/Code/Laravel

sites:
    - map: homestead.app
      to: /home/vagrant/Code/Laravel/public

databases:
    - homestead

variables:
    - key: APP_ENV
      value: local

$ vi scripts/homestead.rb

class Homestead
  def Homestead.configure(config, settings)
    # Configure The Box
    config.vm.box = "laravel/homestead"
#    config.vm.hostname = "homestead"
    config.vm.hostname = settings["hostname"] ||="homestead"

    # Configure A Private Network IP
    config.vm.network :private_network, ip: settings["ip"] ||= "192.168.10.10"

    # Configure A Few VirtualBox Settings
    config.vm.provider "virtualbox" do |vb|
#      vb.name = 'homestead'
      vb.name = settings["name"] ||='homestead'