Go to the link below to download virtual box
https://www.virtualbox.org/wiki/Linux_Downloads
Go to the link below to download vagrant box
https://www.vagrantup.com/downloads.html
After downloading you install it by right clicking on the deb file to install with ubuntu software center
#then you run
$ vagrant box add laravel/homestead
#this will ask you to select from list, you will choose virtual box as you have installed it earlier in your machine
#then you wait for it to download it may take along time depending on how fast your internet is.
#then run this command below, it will create a homestead dir which will serve as the host to all your larvel projects
$ git clone https://github.com/laravel/homestead.git ~/Homestead
$ cd ~/Homestead
# Clone the desired release… check latest list @ https://github.com/laravel/homestead/releases
$ git checkout v7.12.0
# Run the code below depending on your operating system so that the Homestead directory to create the Homestead.yaml configuration file. The Homestead.yaml file # will be placed in the Homestead directory:
# Mac / Linux…
bash init.sh
# Windows…
init.bat
#Setting Your Provider
# go to The provider key in your Homestead.yaml file indicates which Vagrant provider should be used: virtualbox, vmware_fusion, vmware_workstation, parallels or #hyperv. You may set this to the provider you prefer:
$ sudo nano Homestead.yaml
#provider: virtualbox
# set the folder for your files
folders:
– map: ~/websites
to: /home/vagrant/websites
sites:
– map: school.local
to: /home/vagrant/websites/mylaravelproject/public
!important
You need to create the folder where your codes where your stay
Eg if you do /home/vagrant/websites you will create a websites folder in your home directory
this will enable mapping
### remember to set the name school.local in /etc/host file
$ sudo nano /etc/hosts
#192.168.10.10 school.local
#this ip is located at the top of your .yaml file
#then set
$ touch ~/.ssh/id_rsa
#Then
$ vagrant up
# if you are getting error after running vagrant up , restart you pc , when its coming up press f10 or f12 depending on your pc to get to the bios setup
# locate the virtualization and enable it, save and let the system boot
#go to your homestead folder in the home dir after the system has booted
#then run
$ vagrant up
#then
$ vagrant ssh
NOTE
# everytime you make changes in the .yaml file run
$ vagrant reload --provision
#then you are good have a nice day
-
Previous Post
ADDING INVENTION IMAGE TO LARAVEL