Ubuntu12.04 install NFSserver first install nfs-kernel-serverapt-getinstallnfs-kernel-server and then create a directory: mkdir-p/opt/share and grant the permission 777: chmod-R777/opt/share add configuration in the/etc/exports file:/opt/s
Install NFS server in Ubuntu 12.04
First install nfs-kernel-server
Apt-get install nfs-kernel-server
Then create a directory:
Mkdir-p/opt/share
And grant permissions 777:
Chmod-R 777/opt/share
Add the configuration in the/etc/exports file:
/Opt/share 10.112.18.0/255.255.255.0 (rw, no_root_squash)
Add the configuration in/etc/hosts. allow:
Portmap: 10.112.18.0/255.255.255.0
Add the configuration in/etc/hosts. deny:
Portmap: ALL
Restart two services:
Service portmap restart
Service nfs-kernel-server restart
Install nfs-common on another Ubuntu
Apt-get install nfs-common
Then create the directory test
Mkdir ~ /Test
Run the test command to check the following:
# Showmount-e 10.112.18.158
Export list for 10.112.18.158:
/Opt/share 10.112.18.0/255.255.255.0
Find the nfs server Mount directory. Now manually mount:
Mount-t nfs4 10.112.18.158:/opt/share ~ /Test/
Now we can test it. It should be successful.