Setting up Homestead on WIndows 10
Following this link https://laravel.com/docs/5.2/homestead
The above link is missing couple of step which I will note in this blog
- Install git, virtualbox, vagrant
- Run the gitbash run, this run inside your current user profile folder c:\users\jake –> if your username is jake
- “vagrant box add laravel/homestead –unsecure” —> download laravel/homestead and install virtualbox on your computere
- git clone https://github.com/laravel/homestead.git Homestead –> can go separate project folders,
- it also create .homestead directory in user profile folder which as Homestead.yaml –> this a configuration file which setup virtualbox vm, ip, shared folder between virtualbox and computer
- So if open Homestead.yaml
- ip: “192.168.10.10” —–> ip of your virtualbox –> on windows u need to point c:\windows\system32\drivers\etc\host 192.168.10.10 homestead.app
memory: 2048 —–> memory of virtualbox
cpus: 1 ——> no of cpu virtualbox will use
provider: virtualbox —-> which virtualization technology u use.
- authorize: ~/.ssh/id_rsa.pub —> use public key for encrypted communication used between computer and vmkeys: – ~/.ssh/id_rsa —> private key
- Ok so for step 8, you need to create a public and private key on user profile folder. To do this inside of git type —> ssh-keygen -t rsa -C “<place_emailaddress_here>”.
– map: G:\Project\Php —-> shared drive on your computer that share with vm
to: /home/vagrant/Code —–> shared drive on vm
– map: laravel.dev
- Once all the configuration done, save Homestead.yaml
- Inside Homestead folder in git type “vagrant up” –> if all configuration is ok. This should setup vm with ip, shared folders, sites.
- Doing a ping 192.168.10.10 should confirm the vm is up.