NFSv3 Server and Client Installation / Ubuntu 16.04 Environment
1. Installation Environment
The installation environment is as follows.
- Ubuntu 16.04 LTS 64bit, root user
- NFS Root: Refers to the absolute path of the root directory of the NFSv3 Server.
- Use /nfs-root as NFS Root.
- NFS share: Refers to the absolute path of the directory to be actually shared through the NFSv3 Server.
- Use /root/nfs-share as NFS share.
2. NFSv3 Server Configuration
2.1. Ubuntu Package Installation
$ sudo apt-get install nfs-kernel-server nfs-common rpcbindInstall the NFSv3 Server package.
2.2. Shared Folder Creation and Bind Mount Configuration
$ mkdir -p /nfs-root
$ mkdir -p /root/nfs-share
$ chmod 777 /root/nfs-share
$ mount --bind /root/nfs-share /nfs-rootCreate shared folders and perform bind mount.
| |
Add the content from [File 2] to the /etc/exports file.
2.4. Restart
$ /etc/init.d/nfs-kernel-server restartRestart the NFSv3 Server.
3. NFSv3 Client Configuration
$ apt-get install nfs-commonInstall the NFSv3 Client package.
$ mount -t nfs localhost:/nfs-root /mntPerform NFSv3 mount.