Prepare installation: VirtualBox 5.1; Vagrant; composer
$ vagrant box add laravel/homestead
$ cd ~
$ git clone https://github.com/laravel/homestead.git Homestead
$ cd Homestead
$ git checkout v6.5.0
Init homestead
// Mac / Linux...
$ bash init.sh
// Windows...
$ init.bat
Modify file "Homestead.yaml"
folders:
- map: /the/path/in/pc
to: /home/vagrant/code
$ ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
$ eval "$(ssh-agent -s)"
$ ssh-add -k ~/.ssh/id_rsa
$ cd /the/path/in/pc
$ composer create-project laravel/laravel projectName
Init and set up vagrant
$ vagrant up
Stop vagrant
$ vagrant halt
Connect to vagrant env
$ vagrant ssh
Restart vagrant
$ vagrant reload
Win host file path:
ReplyDeleteC:\Windows\System32\drivers\etc\hosts