From the course: Linux: File Sharing Services

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Set up an NFS server

Set up an NFS server - Linux Tutorial

From the course: Linux: File Sharing Services

Start my 1-month free trial

Set up an NFS server

- [Instructor] To set up a system to host an NFS server we just need to install the NFS utils package. I'll do that here in my system with sudo yum install nfs-utils and there we go. The next step is to have something to share. I'll create a folder in my /srv directory to act as our fileshare. I'll write sudo mkdir /srv and I'll call it nfs-share. I'll make some files in there too. I'll write sudo fallocate - l 20MB and let's call it /srv /nfs-share/file_1 and file_2 and I'll open up the permissions on this folder in the files since these were created by root and I want to let other users make changes to these files and be able to add information there. I'll write sudo chmode - R for recursive a+w /srv/nfs-share. The next step to take is to tell the NFS server about this folder. Folders shared via NFS are called exports and the file that controls what the server is able to export is the /etc/exports file. It starts out blank. Let's export this folder that we just created by adding it…

Contents