Skip to content

This documentation provides step-by-step instructions for setting up an NFS (Network File System) server and client. NFS allows sharing files between systems on a network, making it a convenient solution for file storage and sharing.

Notifications You must be signed in to change notification settings

stanleyogada/ingryd-nfs-server-client-setup-docs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

INGRYD-NFS-SERVER-CLIENT-SETUP-DOCS

Setting Up NFS Server and Client - Documentation

Introduction

This documentation provides step-by-step instructions for setting up an NFS (Network File System) server and client. NFS allows sharing files between systems on a network, making it a convenient solution for file storage and sharing.

Author: Stanley Chinedu Ogada

Table of Contents

  1. Prerequisites
  2. Setting Up NFS Server
  3. Configuring NFS Server
  4. Setting Up NFS Client
  5. Mounting NFS Share on Client
  6. Automounting NFS Share
  7. Conclusion

1. Prerequisites

Before proceeding, ensure the following:

  • Server and Client Machines:

    • You have two machines: one to act as the NFS server and the other as the client.
    • Both machines are connected to the same network.
  • User Privileges:

    • You have administrative access to both the server and client machines.

2. Setting Up NFS Server

On the Server Machine

  1. Install NFS Server:

    sudo apt update
    sudo apt install nfs-kernel-server
  2. Create a Directory to Share:

    sudo mkdir /shared_directory
  3. Set Permissions:

    sudo chown nobody:nogroup /shared_directory
    sudo chmod 777 /shared_directory

3. Configuring NFS Server

  1. Edit Exports File:

    Open /etc/exports using a text editor:

    sudo nano /etc/exports

    Add the following line to allow access to the shared directory:

    /shared_directory  client_ip(rw,sync,no_subtree_check)
    

    Replace client_ip with the IP address of your client machine.

  2. Restart NFS Server:

    sudo systemctl restart nfs-kernel-server

4. Setting Up NFS Client

On the Client Machine

  1. Install NFS Client:

    sudo apt update
    sudo apt install nfs-common

5. Mounting NFS Share on Client

  1. Create a Local Mount Point:

    sudo mkdir /mnt/nfs_share
  2. Mount NFS Share:

    sudo mount server_ip:/shared_directory /mnt/nfs_share

    Replace server_ip with the IP address of your NFS server.

6. Automounting NFS Share

  1. Install autofs:

    sudo apt install autofs
  2. Configure Autofs:

    Open /etc/auto.master:

    sudo nano /etc/auto.master

    Add the following line at the end:

    /mnt /etc/auto.nfs_share
    

    Create /etc/auto.nfs_share:

    sudo nano /etc/auto.nfs_share

    Add:

    nfs_share  -fstype=nfs,rw,sync,no_subtree_check server_ip:/shared_directory
    

    Restart autofs:

    sudo systemctl restart autofs

7. Conclusion

You have successfully set up an NFS server and client, allowing seamless file sharing between machines. Adjust configurations based on your specific requirements.

Note: This documentation was authored by Stanley Chinedu Ogada. If you have any questions or encounter issues, feel free to reach out for personalized assistance.

About

This documentation provides step-by-step instructions for setting up an NFS (Network File System) server and client. NFS allows sharing files between systems on a network, making it a convenient solution for file storage and sharing.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages