NFS : Configure NFS Server2023/12/26 |
Configure NFS Server to share directories on your Network.
This example is based on the environment like follows. +----------------------+ | +----------------------+ | [ NFS Server ] |10.0.0.30 | 10.0.0.51| [ NFS Client ] | | dlp.srv.world +----------+----------+ node01.srv.world | | | | | +----------------------+ +----------------------+ |
|
[1] | Configure NFS Server. |
root@dlp:~ #
vi /etc/rc.conf # add to last line nfs_server_enable="YES" nfsv4_server_enable="YES" nfsuserd_enable="YES" # specify your domain name nfsuserd_flags="-domain srv.world"
root@dlp:~ #
vi /etc/exports # create new # for example, set [/home/nfsshare] as NFS share # [V4: /home] ⇒ specify NFSv4 root directory # [-network *** -mask ***] ⇒ network range that you export NFS share
V4: /home -network 10.0.0.0 -mask 255.255.255.0
/home/nfsshare -maproot=root mkdir /home/nfsshare root@dlp:~ # service nfsd start Starting rpcbind. Starting mountd. Starting nfsd. |