
Siga estes dois guias para instalar o servidor e cliente NFS:
- https://www.howtoforge.com/nfs-server-and-client-on-centos-7
- https://www.howtoforge.com/tutorial/setting-up-an-nfs-server-and-client-on-centos-7/
Anfitriões:
- Servidor: 192.168.1.1
- Cliente: 192.168.1.2
Servidor
Configuração /etc/exports
no servidor:
[root@server ~]# cat /etc/exports
/var/nfsshare *(rw,sync,no_root_squash,no_all_squash)
/home *(rw,sync,no_root_squash,no_all_squash)
/var/nfs *(rw,sync,no_root_squash,no_all_squash)
Correr:
[root@server ~]# exportfs -a
Cliente
Então tentei montar o servidor do cliente, ocorreu o erro:
[root@client ~]# mount -t nfs 192.168.1.1:/home /mnt/nfs/home/
mount.nfs: access denied by server while mounting 192.168.1.1:/home
No entanto, posso ver informações de montagem do cliente:
[root@client ~]# showmount -e 192.168.1.1
Export list for 192.168.1.1:
/var/nfs *
/home *
/var/nfsshare *
O que está errado?