自分では使っていないが、やりたい人もいるのでメモ。
VirtualBox 起動、接続まで
mac$ brew install caskroom/cask/brew-cask
mac$ brew cask install virtualbox
mac$ brew cask install vagrant
mac$ vagrant box add centos7 https://f0fff3908f081cb6461b407be80daf97f07ac418.googledrive.com/host/0BwtuV7VyVTSkUG1PM3pCeDJ4dVE/centos7.box
mac$ vagrant init centos7
mac$ vagrant plugin install vagrant-vbguest
mac$ vagrant up
mac$ vagrant ssh
# ちなみに停止したいときは vagrant halt
Linux と Mac の フォルダを共有
mac$ vi Vagrantfile
config.vm.synced_folder "/Users/<UserName>/html", "/var/www/html", mount_options: ["dmode=777,fmode=755"]
mac$ vagrant reload
Linux の設定をする (省略してある)
vagrant$ yum -y update vagrant$ yum -y install nginx mysql-server php-fpm php-mysql vagrant$ systemctl start mysqld vagrant$ systemctl start nginx vagrant$ systemctl start php-fpm vagrant$ systemctl stop firewalld vagrant$ systemctl enable mysqld vagrant$ systemctl enable nginx vagrant$ systemctl enable php-fpm vagrant$ systemctl disable firewalld vagrant$ vi /etc/selinux/config # SELINUX=disabled にする
あとは Mac上でファイルを編集