Setting Up Server
-
1. Installing Software
Now Install Required Packages
With:Copysudo apt install nfs-kernel-server rpcbind nfs-common
-
2. Configuring
Again
Make Configuration.
-
Configure rpcbind.
Copysudo nano /etc/default/rpcbind
Append:
CopyOPTIONS=""
Ctrl+x to Save & Exit from nano Editor.
Again:
Copysudo nano /etc/hosts.allow
For Example on a Local Network:
Copyportmap: 192.168.1.
To Find your Machine IP Address do:
Copyifconfig
In this Example Allow 192.168.1.0/24 to be Accessed on Network.
-
Configure idmapd.
Copysudo nano /etc/default fs-common
Inserts:
CopyNEED_IDMAPD=YES
Then:
Copysudo nano /etc/idmapd.conf
The Content should Correspond to:
Copy[General] Verbosity = 0 Pipefs-Directory = /var/lib fs/rpc_pipefs Domain = localdomain [Mapping] Nobody-User = nobody Nobody-Group = nogroup
-
Configure NFS.
Copysudo nano /etc/exports
Append something Like:
Copy/exports 192.168.1.0/255.255.255.0(rw,no_root_squash,no_subtree_check,crossmnt,fsid=0)
-
-
3. Bindinding Directories
Now Make and Bind the Sharing Directories.
Copysudo mkdir -p /exports/home
Then to Bind your home to /exports/home do:
Copycd /exports
Copysudo mount --bind /home ./home
To have this SetUp Loaded on Boot Edit fstab:
Copysudo nano /etc/fstab
Appending like in Example:
Copy/home /exports/home none bind
-
5. Starting Services
Now StartUp server File Sharing over Network Services
Run:Copysudo /etc/init.d fs-kernel-server start
And again:
Copysudo /etc/init.d/rpcbind start
Contents