Follow these two guides installed NFS server and client:
- 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/
Hosts:
- Server: 192.168.1.1
- Client: 192.168.1.2
Server
Config /etc/exports
on server:
[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)
Run:
[root@server ~]# exportfs -a
Client
Then tried to mount server from client, got error:
[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
However, I can see mount information from client:
[root@client ~]# showmount -e 192.168.1.1
Export list for 192.168.1.1:
/var/nfs *
/home *
/var/nfsshare *
What's wrong?
0 Answers