JAVA SCRIPT

RH 253: HOW TO CONFIGURE NFS SERVER


 

    TO CONFIGURE NFS SERVER

1.  mkdir   /share           

->create a dir under  /  which you want to share.

2.  chmod a+w /share         

->Allow all to write to the /share dir

3. vim /etc/exports       

   
Below are different types of file shares.


a. /abc  *(rw,sync)         //All Domain

b. /abc  *.example.com(rw,sync)                         
   /abc  *.matrix.com(rw,sync)     //Two Domains

c. /abc   *.example.com(rw,sync)
//Only 1  domain                       
d. /abc   192.168.0.82(rw,sync)   //Single Machine

e. /abc   192.168.0.82(rw,sync)  192.168.0.42(rw,sync)   //Double Machine

f. /abc   192.168.0.1-10(rw,sync) //Range of ips

g. /abc            192.168.0.0/24(ro,sync)       //Read-Only file,cant create file,after mounting

h. /abc          *(rw,sync,no_root_squash) 

   //When client creates file  under /share dir, it gets created under roots name

4. service portmap restart

 
5. service nfs restart

 
6. rpcinfo -p              ->Shows random port num


 

            NFS CLIENT

showmount -e 192.168.0.38  

-->shows dir shared by remote/server




1. TEMPORARY MOUNTING

 
mount 192.168.0.38:/songs /media
cd /media/
ls
mount
cd
umount /media

2. PERMANENT MOUNTING

->vim /etc/fstab


192.168.0.38:/songs  /media   nfs  defaults    1 2

->mount -a
 

->mount



 


If you found this post useful, I would really love it, if you can Like the Page, or share it with your Facebook/Google+/Twitter Friends... It will keep me motivated. Thank you!

No comments:

Post a Comment