Skip to content

Instantly share code, notes, and snippets.

@midascodebreaker
Last active March 15, 2022 10:09
Show Gist options
  • Select an option

  • Save midascodebreaker/95d5e30012c2f875840481442e7eb04c to your computer and use it in GitHub Desktop.

Select an option

Save midascodebreaker/95d5e30012c2f875840481442e7eb04c to your computer and use it in GitHub Desktop.
Laravel Homestead per Project Installation on Windows 10
1.) Create a New Laravel App
laravel new blog
2.) Create a New Homestead Installation
composer require "laravel/homestead" --dev
3.) Update Composer
composer update
4.) Generate Homestead.yaml file
vendor\\bin\\homestead make
5.) Edit Homestead.yaml file
OPTIONS
A.) ENABLE NFS
```
folders:
- map: "C:/Users/USER/Code/project"
to: "/home/vagrant/project"
type: nfs
mount_options: [nolock,vers=3,udp,noatime]
```
B. HHVM ENABLED
```
sites:
- map: homestead.app
to: /home/vagrant/Code/Laravel/public
hhvm: true
```
C.) CRON ENABLED
```
sites:
- map: homestead.app
to: /home/vagrant/Code/Laravel/public
schedule: true
```
D.) MARIADB ENABLED
```
mariadb:true
```
6.) PROVISION SERVER
```
vagrant up
```
7.) SSH TO SERVER
```
vagrant ssh
```
8.) Configure Vagrant Based On Options Enabled
A.) Make sure You Have NFS Installed Follow this Instruction
```
https://github.com/winnfsd/vagrant-winnfsd
```
B.) HHVM Enabled
```
hhvm --version
```
it should show something like this.
```
HipHop VM 3.14.1 (rel)
Compiler: tags/HHVM-3.14.1-0-gd99b370804b7e0234ab794869d1ba1774c848e85
Repo schema: ac0c6851ba5643ce00ae67bbe67c50973efd65d6
```
C.) Cron Enabled
```
cd /etc/cron.d
```
add this
```
* * * * * php /path/to/artisan schedule:run >> /dev/null 2>&1
```
D.) MARIA DB Enabled
check if maria db installed
```
mysql -u homestead -p
password: secret
```
it should show something like this
```
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 41818
Server version: 10.1.14-MariaDB-1~xenial mariadb.org binary distribution
Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]>
```
9.) Edit Host File (Local Machine)
add ip address based on your Homestead.yml file
```
192.168.XX.XX domainname.app
```
10.) Run Npm Install (Local Machine)
```
npm install
```
11.) Test to Run Gulp (Local Machine)
```
gulp
```
@quynv-rikkei
Copy link

I have a question: I still have to install PHP, Composer on Local machine to can use Homestead per Laravel project ? If use globally Homestead config, I don't have to install PHP, Composer on Local machine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment