Saturday, August 29, 2009

Linux NFS Server Configuration

What is NFS Server

The Network File System (NFS) was developed to allow machines to mount a disk partition on a remote machine as if it were a local disk. It allows for fast, seamless sharing of files across a network

How to Configure NFSServer in Linux

#There is two way to configure NFS Server.
#Using NFS Server COnfiguration Tool (System-Config-NFS)
#manually Editing Configuration File vi /etc/exportfs
NFS Server Configuration Tool

#root@locathost#system-config-nfs
#Basic tab add the below details
#Directory — Specify the directory to share, such as /tmp.
#Host(s) — Specify the host(s) with which to share the directory.(bglinux or 138.239.197.10 or * to give everyone access)
#Basic permissions — Specify whether the directory should have read-only or read/write permissions.

#General tab->click checkbox Sync write operations on request
#Hide Filesystem beneath
Manually Editing NFS Server Configuration File vi /etc/exportfs

#root@localhost#vi /etc/exportfs
#root@localhost# /work *(ro,sync) (edit or delete and !wq save file)
#root@localhost#exportfs -a (reflect changes in NFS Server
Linux NFS configuration services

#root@localhost#etc/rc.d/init.d/portmap start
#root@localhost#/etc/rc.d/init.d/nfslock start
#root@localhost#/etc/rc.d/init.d/nfs start

Verify NFS Server is Running

#root@localhost#rpcinfo -p
program vers proto port
100000 2 tcp 111 portmapper
100000 2 udp 111 portmapper
100011 1 udp 749 rquotad
100011 2 udp 749 rquotad
100005 1 udp 759 mountd
100005 1 tcp 761 mountd
100005 2 udp 764 mountd
100005 2 tcp 766 mountd
100005 3 udp 769 mountd
100005 3 tcp 771 mountd
100003 2 udp 2049 nfs
100003 3 udp 2049 nfs
300019 1 tcp 830 amd
300019 1 udp 831 amd
100024 1 udp 944 status
100024 1 tcp 946 status
100021 1 udp 1042 nlockmgr
100021 3 udp 1042 nlockmgr
100021 4 udp 1042 nlockmgr
100021 1 tcp 1629 nlockmgr
100021 3 tcp 1629 nlockmgr
100021 4 tcp 1629 nlockmgr

No comments:

Post a Comment