Skip to content

Instantly share code, notes, and snippets.

@degerstrom
Last active August 29, 2015 14:15
Show Gist options
  • Select an option

  • Save degerstrom/6e65e888e149aacbb932 to your computer and use it in GitHub Desktop.

Select an option

Save degerstrom/6e65e888e149aacbb932 to your computer and use it in GitHub Desktop.
Notes for Homestead on Mac OS X

Notes on how I fixed the terrible Homestead performance on Mac OS X.

Shared folders seem to be an issue. Do this in homestead.rb (mine was located in ~/.composer/vendor/laravel/homestead/scripts/):

# Register All Of The Configured Shared Folders
# (Comment the lines following, and insert this:)
settings["folders"].each do |folder|
  config.vm.synced_folder folder["map"], folder["to"],
    id: folder["map"],
    :nfs => true,
    :mount_options => ['nolock,vers=3,udp,noatime']
end

To avoid having to enter your password whenever you do homestead up, put this in your /etc/sudoers:

Cmnd_Alias VAGRANT_EXPORTS_ADD = /usr/bin/tee -a /etc/exports
Cmnd_Alias VAGRANT_NFSD = /sbin/nfsd restart
Cmnd_Alias VAGRANT_EXPORTS_REMOVE = /usr/bin/sed -E -e /*/ d -ibak /etc/exports
%admin ALL=(root) NOPASSWD: VAGRANT_EXPORTS_ADD, VAGRANT_NFSD, VAGRANT_EXPORTS_REMOVE

Then set sendfile off in /etc/nginx/nginx.conf to avoid caching funkiness.

Also, setting xdebug.remote_connect_back=0 in /etc/php5/mods-available/xdebug.ini seems to help.

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