How To Setup a Nfs Server?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
1. Install the NFS service: Use a package manager to install the NFS service package. This can vary depending on the distribution you are using. On most Linux distributions, this command will work: sudo apt–get install nfs–kernel–server
2. Configure the NFS Exports File: The NFS exports file defines which directory/folders is shared with other machines. It is usually located in the /etc/ directory. To edit it, open it in your favorite text editor, then add new directory entries.
For example:
/var/nfsshare 10.0.0.0/255.255.255.0(rw,sync) This will share the /va/nfssharefolder with all machines within the 10.0.0.0/24 range and a read–write (rw) mode.
3. Start the NFS Service: Once you have edited the exports file, you will need to start the required services. On most distributions, the command to start NFS is:
sudo service nfs–kernel–server start This will start the NFS service so that other machines can connect to it.
4. Test the Setup: To test your setup, you can use the showmount command. This will list all of the available mounts for your NFS server. If everything is working correctly, then you should see output similar to this: # showmount –e Export list for localhost:
/var/nfsshare 10.0.0.0/255.255.255.0
If everything looks good, then you are done and your NFS server is ready for use.