Setting up Homestead on WIndows 10

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

  1. Install git, virtualbox, vagrant
  2. Run the gitbash run, this run inside your current user profile folder c:\users\jake –> if your username is jake
  3. “vagrant box add laravel/homestead –unsecure”   —> download laravel/homestead and install virtualbox on your computere
  4.  git clone https://github.com/laravel/homestead.git Homestead   –> can go separate project folders,
  5. 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
  6. So if open Homestead.yaml
  7. 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.
  8. authorize: ~/.ssh/id_rsa.pub       —> use public key for encrypted communication used between computer and vmkeys: – ~/.ssh/id_rsa    —> private key
  9. 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>”.
  10.  folders:
    – map: G:\Project\Php     —-> shared drive on your computer that share with vm
    to: /home/vagrant/Code   —–> shared drive on vm
  11. sites:
    – map: laravel.dev
    to: /home/vagrant/Code/Laravel/public
  12. databases:
    – laraveldb
  13. Once all the configuration done, save Homestead.yaml
  14. Inside Homestead folder in git type “vagrant up” –> if all configuration is ok. This should setup vm with ip, shared folders, sites.
  15. Doing a ping 192.168.10.10 should confirm the vm is up.

Leave a Reply

Your email address will not be published. Required fields are marked *