How to install and configure NFS server on linux step by step guide


How to install and configure NFS server on linux step by step guide


In this tutorial we learn What is NFS, how to install and configure NFS server on linux system and how to mount shared folder to the client machine and after configuration server and client end how to verify it.

What is NFS

NFS is network file system. NFS is basically used to share file and folder among all types of unix flavors and NFS share folder can be mounted as a local file system.

LAB Environment

We need two machines one is NFS server which share the folder and other is client which receives the shared folder from the NFS server.
NFS Server ipaddress===============è192.168.137.2
NFS Client ipaddress============= ==è192.168.137.3

Configuration of NFS Server on linux

To configure NFS server we need to install nfs packages into the server. To install the packages on the server we execute the below command.

[root@server ~]# yum install nfs* -y

How to install and configure NFS server on linux step by step guide
How to install and configure NFS server on linux step by step guide


After installing the required packages we need to start the NFS service and enable the service during the startup mode. To do this we execute the below command.

[root@server ~]#service nfs start;chkconfig nfs on

Export the share folder

We need to export entry into the /etc/exports file which folder we want to share with the client machine.
Suppose we want to share /project folder with the client.we need to entry in the below format in the /etc/exports file.

[root@server ~]# cat /etc/exports
/project 192.168.137.3(rw,sync)


Here,
 /project========= is the shared directory
 192.168.137.3===== is the client machine ipaddress
 rw=============client have the read write permission for this folder
 sync============synchronization enable for the shared folder between client and server machine.

Once above all step have been completed to export shared folder to the client system we execute the below command
  
[root@server ~]#exportfs –a

Configure the client machine on linux


First create the mount point to mount the shared folder which came from server.

[root@client ~]# mkdir -p /mnt/project

Then mount the shared folder

[root@client ~]#mount 192.168.137.2:/project /mnt/project

To verify it we execute “df –h” command .

That’s all. If this article is helpful please share the article.



SHARE

Admin

  • Image
  • Image
  • Image
  • Image
  • Image
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment