Skip to content

Instantly share code, notes, and snippets.

@hawkup hawkup/
Last active Dec 5, 2015

What would you like to do?

Install Homestead

install VirtualBox
install Vagrant
vagrant box add laravel/homestead
git clone Homestead
cd Homestead

Installation Homestead PHP 7

git clone -b php-7 Homestead7
# if you already have ~/.homestead no need to run bash
# add this line on top of ~/.homestead/Homestead.yaml file
box: laravel/homestead-7
# then run vagrant up


# config file stay in ~/.homestead/Homestead.yaml
# set provider
provider: virtualbox

# generate SSH key
ssh-keygen -t rsa -C "you@homestead"

# sync folder
# map 
# to [Virtual]
    - map: ~/Code
      to: /home/vagrant/Code
# config nginx site
    - map:
      to: /home/vagrant/Code/Laravel/public

set hosts file

vim /etc/hosts
# set
# can access

Launch Project

cd Homestead
vagrant up

Destory Vagrant

vagrant destroy --force

Create Laravel project

vagrant ssh
cd Code
laravel new {project}

Per Project Homestead

cd {project}
composer require laravel/homestead --dev
php vendor/bin/homestead make
vagrant up
# add this line on top of Homestead.yaml in project folder (under ---)
box: laravel/homestead-7


cd {project}
vagrant ssh
mysql -uroot -p
# username homestead password secret

Start Dev

mysql -uroot -p
mysql > CREATE DATABASE {name};
php artisan key:generate (see .env)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.