Skip to content

NFS Server

Klemen edited this page Jan 9, 2020 · 4 revisions

https://vitux.com/install-nfs-server-and-client-on-ubuntu/

Step 1: Install NFS Kernel Server

Before installing the NFS Kernel server, we need to update our system’s repository index with that of the Internet through the following apt command as sudo:

$ sudo apt-get update

The above command lets us install the latest available version of a software through the Ubuntu repositories.

Now, run the following command in order to install the NFS Kernel Server on your system:

$ sudo apt install nfs-kernel-server

Step 2: Create the Export Directory

The directory that we want to share with the client system is called an export directory. You can name it according to your choice; here, we are creating an export directory by the name of “sharedfolder” in our system’s mnt(mount) directory.

Use the following command, by specifying a mount folder name according to your need, through the following command as root:

$ sudo mkdir -p /mnt/sharedfolder

As we want all clients to access the directory, we will remove restrictive permissions of the export folder through the following commands:

$ sudo chown nobody:nogroup /mnt/sharedfolder
$ sudo chmod 777 /mnt/sharedfolder

Now all users from all groups on the client system will be able to access our “sharedfolder”. You can create as many sub-folders in the export folder as you want, for the client to access.

Step 3: Assign server access to client(s) through NFS export file

Clone this wiki locally