[nfs] Setting Up an NFS Server and Client on CentOS

2020. 8. 27. 17:38IT/Linux

Server:

1. Install nfs-utils

# yum -y install nfs-utils

2. Setting config file

 /etc/exports

[Directory]    [Client_IP](rw,sync,no_root_squash,no_subtree_check)
/home    10.110.0.10(rw,sync,no_root_squash,no_subtree_check)

3. Apply the settings

# exportfs -a

 

Client:

1. Install nfs-utils

# yum -y install nfs-utils

2. Create a directory to mount

# mkdir -p /mnt/nfs/home

3. Mount

# mount [Server_IP]:[Server_Drectory] [Directory]
# mount 192.168.10.243:/home /mnt/nfs/home

4. Confirm

# df -h

 

 

Refer:

 

nfs(5) - Linux man page

nfs(5) - Linux man page Name nfs - fstab format and options for the nfs file systems Synopsis /etc/fstab Description NFS is an Internet Standard protocol created by Sun Microsystems in 1984. NFS was developed to allow file sharing between systems residing

linux.die.net