Laravel Homestead en Fedora 26
Escrito el jueves, 29 de junio del 2017.
Instalación
$ vagrant box add laravel/homestead
$ git clone https://github.com/laravel/homestead.git Homestead
$ cd Homestead
$ git checkout v5.4.0
$ bash init.sh
Homestead.yml
folders:
- map: ~/sitios
to: /home/vagrant/sitios
type: "nfs"
sites:
- map: interpos.app
to: /home/vagrant/sitios/interpos/public
/etc/hosts
192.168.10.10 mysite.app
Soporte NFS
$ vagrant plugin install vagrant-bindfs
$ sudo dnf install nfs-utils nfs-kernel-server firewall-config
$ sudo systemctl enable nfs-server
$ sudo systemctl start nfs-server
$ sudo firewall-cmd --permanent --add-service=nfs
$ sudo firewall-cmd --permanent --add-service=rpc-bind
$ sudo firewall-cmd --permanent --add-service=mountd
$ sudo firewall-cmd --reload
Desde la versión 2.1.1 de nfs-utils
está deshabilitado el soporte a UDP por defecto, por lo que vagrant up
, se queda bloqueado en ==> homestead-7: Mounting NFS shared folders...
, para resolver ésto, hay que editar /etc/sysconfig/nfs
y añadir --udp
a RPCNFSDARGS
.
La anterior solución la encontré en este enlace.
RPCNFSDARGS="--udp"
Virtualbox 5.1.24 bug workaround
$ sudo ip link set vboxnet0 up
Firewall con GUI
Tomado de aquí.
Example for easily configuring firewalld using the "firewall-config" GUI:
- Choose "Configuration: Permanent" from the drop down menu
- Select the zone you want to modify (i chose "internal").
- Go to the "Interfaces" tab, assign vboxnet0 (or other host-only adapter) to the zone.
- Go to the "Services" tab, check "mountd", "nfs" and "rpc-bind"
- Go to the global "Services" tab (next to "Zones"), select NFS and add Port 2049 UDP (only TCP is predefined).
- Finally choose "Options/Reload Firewalld".