Both VirtualBox and Vagrant are software packages which will provide us with some easy-to-use installers which can install all popular operating systems. Once installed you can add a laravel/homestead box to you Vagrant install which might take up to 10 minutes to get ready.
vagrant box add laravel/homestead
Once both are installed and the laravel/homestead box has been finished it’s time to clone the homestead repository to the Homestead directory. For this I have made a map called Homestead inside my coding folder called “Laraveljourney”.
git clone https://github.com/laravel/homestead.git Homestead
Next it’s time to do some configuration changes. I’ve done this by going into the Homestead folder and opening up Homestead.yaml with Coda.
First you might need to add a SSH key, if you for any reason don’t have one yet or you are not sure you have made one before you can just use this command.
ssh-keygen -t rsa -C "email@example.com"
Next up you should change the following inside your Homestead.yaml file, if you are unsure about which you should change your value to it’s best to look things up inside the Laravel documentation. I have changed both map files, the first one was changed to my Laraveljourney folder (where my Homestead and laravel app are located). The second one I changed to journey.app and the last to, here I changed Code/Laravel to Code/my-app-name.
folders: - map: ~/Code to: /home/vagrant/Code sites: - map: homestead.app to: /home/vagrant/Code/Laravel/public
To finish and startup the vagrant server you need to use the following command.
This will make the vagrant machine startup running the application given inside your Homestead.yaml file. If you would now edit your hosts file by adding the following you would be able to use journey.app as a domain name to test your current application on.