Skip to content

Instantly share code, notes, and snippets.

@erickpatrick
Last active January 8, 2024 01:50
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save erickpatrick/b883d31b4e75a15556e633888204c507 to your computer and use it in GitHub Desktop.
Save erickpatrick/b883d31b4e75a15556e633888204c507 to your computer and use it in GitHub Desktop.
Laravel Homestead on Windows with SMB ("faster shared folders")
---
ip: "192.168.10.10"
memory: 4096
cpus: 2
provider: virtualbox
authorize: C:/Users/<your-user>/.ssh/id_rsa.pub
keys:
- C:/Users/<your-user>/.ssh/id_rsa
folders:
- map: C:/Users/<your-user>/<your-shared-folder-path-on-host>
to: /home/vagrant/Code/<your-app>
type: "smb"
mount_options: ["username=USERNAME","password=PASSWORD","vers=3.02","mfsymlinks"]
sites:
- map: your.domain.com
to: /home/vagrant/Code/<your-app>
databases:
- homestead
# This installs an auto upgrade mechanism to VirtualBox Guest Adittions
vagrant plugin install vagrant-vbguest
# This installs a bridge to NFS for Vagrant on Windows
vagrant plugin install vagrant-winnfsd
# From Laravel Homestead Documentation:
# - When using NFS, you should consider installing the vagrant-bindfs plug-in.
# This plug-in will maintain the correct user / group permissions for files
# and directories within the Homestead box.
vagrant plugin install vagrant-bindfs
###########################################
### PLEASE UPDATE YOUR HOMESTEAD.YAML ###
### FILE ACCORDINGLY (CHECK FILE BELOW) ###
### BEFORE RUNNNING COMMAND BELOW ###
###########################################
vagrant reload --provision
@erickpatrick
Copy link
Author

When the app to be installed is Magento2, use the following install command. Remember to change <your.domain.com> and <db-name> to yours

magento setup:install --base-url=your.domain.com  --db-host=localhost \
--db-user=homestead --db-password=secret --db-name=<db-name>--admin-firstname=Magento \
--admin-lastname=User --admin-email=user@example.com --admin-user=admin \
--admin-password=admin123 --language=en_US --currency=EUR \
--timezone=Europe/Berlin --use-rewrites=1

@erickpatrick
Copy link
Author

Remeber to run sudo apt-get install php7.1-mcrypt as Magento 2 requires it

@erickpatrick
Copy link
Author

erickpatrick commented Jul 10, 2017

If unable to mount shared folders, check this post https://stackoverflow.com/a/43497420

  • this definitely solves the problems

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