Thursday, 12 April 2012

How to Setup NFS in Linux Server

How to Setup NFS Server

Step 1: Install the following nfs packages in linux server
  •    nfs-utils
  •    libevent
# rpm -ivh nfs-utils-1.0.9-60.el5.x86_64.rpm libevent-1.4.13-1.x86_64.rpm

Step 2: Start the nfs and portmap service as mentioned below

# /etc/init.d/nfs start
# /etc/init.d/portmap restart

Step 3: Open the nfs file /etc/exports and enter details as below

# vim /etc/exports

/data   10.2.1.x(rw,no_root_squash) 10.2.1.x(rw,no_root_squash)

Step 4: Save the file and restart portmap and nfs service

How to Setup NFS Client:

Step 1: Login the server where u want to mount the nfs partition and start netfs and portmap service

# /etc/init.d/netfs start
# /etc/init.d/portmap start

Step 2: Open the fstab file and make an entry as below

# vim /etc/fstab
10.2.1.x:/data/dbbackup     /nfs          nfs               defaults               0 0

Step 3:  Save the file and restart netfs service

Step 4: execute mount command to mount the nfs partition

# mount -a

Step 5:  check whether the nfs partition is mounted using the below command

#df -h


http://www.cyberciti.biz/faq/centos-fedora-rhel-nfs-v4-configuration/


No comments:

Post a Comment