Important files for NFS Configration
- /etc/exports: Its a main configuration file of NFS, all exported files and directories are defined in this file at the NFS Server end.
- /etc/fstab: To mount a NFS directory on your system across the reboots, we need to make an entry in /etc/fstab.
- /etc/sysconfig/nfs: Configuration file of NFS to control on which port rpc and other services are listening.
To setup NFS mounts, we’ll be needing at least two Linux/Unix machines. Here in this tutorial, I’ll be using two servers.
NFS Server: nfs.example.com with IP-192.168.0.63
NFS Client : nfs-client.example.com with IP-192.168.0.64
At NFS Server End
Step 1: As the first step, we will install these packages on the CentOS server with yum
# sudo yum install nfs-utils -y
Step 2: Now create the directory that will be shared by NFS
# sudo mkdir /var/nfsshare
Step 3: Change the permissions of the folder as follows:
# chmod -R 755 /var/nfsshare# chown nobody:nobody /var/nfshare
NOTE: We use /var/nfsshare as shared folder, if we use another drive such as the /home directory, then the permission chnges will cause a massive permissions problem and ruin the whole hierarchy. So in case we want to share the /home directory then permissions must not be changed.
Step 4:
# PATH=$PATH:${ANT_HOME}/bin
No comments:
Post a Comment