How to configure NFS in REDHAT Linux
Below is my configuration
NODE3 : (NFS Client)
192.9.1.103
NODE2 : (NFS Server)
192.9.1.101
Folder to share : /u01/SOFTWARE
Steps to configure
1) Install the required packages for the NFS on both the server(NODE2) and client(NODE3).
nfs-utils-1.0.9-42.el5.x86_64.rpm
nfs-utils-lib-1.0.8-7.6.el5.x86_64.rpm
nfs-utils-lib-devel-1.0.8-7.6.el5.x86_64.rpm
nfs4-acl-tools-0.3.3-1.el5.x86_64.rpm
portmap-4.0-65.2.2.1.x86_64.rpm
To install the package , use the below command.
rpm -ivh
2) ON NFS SERVER
2a) make an entry about the directory we want to share in the /etc/exports file like below.
/u01/SOFTWARE 192.9.1.103(rw,sync,fsid=0)
2b) Start the services
service nfs start
service portmap start
2c) Configure service will start automatically after reboot.
chkconfig nfs on
chkconfig portmap on
3) ON CLIENT
3a) execute the below command as root user.
mkdir /SOFTWARE
mount 192.9.1.101:/u01/SOFTWARE /SOFTWARE
[root@node3 etc]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda5 9.5G 647M 8.4G 8% /
/dev/sda9 2.9G 69M 2.7G 3% /opt
/dev/sda8 4.8G 138M 4.4G 4% /home
/dev/sda7 4.8G 2.7G 1.9G 60% /usr
/dev/sda10 1.9G 36M 1.8G 2% /usr/local
/dev/sda6 4.8G 194M 4.3G 5% /var
/dev/sda3 9.5G 151M 8.9G 2% /tmp
/dev/sda1 2.9G 75M 2.7G 3% /boot
tmpfs 501M 0 501M 0% /dev/shm
192.9.1.101:/u01/SOFTWARE 59G 12G 44G 21% /SOFTWARE ===> Filesystem got mounted.
3b) Make below entry in /etc/fstab of nfs client (NODE2) to mount the filesystem automatically after reboot.
192.9.1.103:/u01/SOFTWARE /SOFTWARE nfs4 soft,intr,rsize=8192,wsize=8192,nosuid