1.Configure a NFS server
service nfs start
service nfslock start
service portmap start
chkconfig nfs on
chkconfig nfslock on
chkconfig portmap on
 
edit /etc/exports
/shared 192.168.1.0/24(rw,sync)
 
check the export status
showmount -e localhost
edit /etc/sysconfig/nfs
MOUNTD_PORT=4002
STATD_PORT=4003
LOCKD_TCPPORT=4004
LOCKD_UDPPORT=4004
RQUOTAD_PORT=4005
configure iptables to allow NFS access
iptables -I INPUT -s 192.168.1.0/24 -p tcp –dport 111 -j ACCEPT
ptables -I INPUT -s 192.168.1.0/24 -p udp –dport 111 -j ACCEPT
iptables -I INPUT -s 192.168.1.0/24 -p tcp –dport 2049 -j ACCEPT
iptables -I INPUT -s 192.168.1.0/24 -p udp –dport 2049 -j ACCEPT
iptables -I INPUT -s 192.168.1.0/24 -p tcp –dport 4002:4005 -j ACCEPT
iptables -I INPUT -s 192.168.1.0/24 -p udp –dport 4002:4005 -j ACCEPT
 
cilent : mount server:/shared /mnt
check the folder
create a file and check it on server side
Advertisements