NFS的配置與應用

 NFS主要用於不同操作系統之間的文件共享

 

  1. [root@localhost ~]# yum groupinstall nfs-file-server -y 
  2. [root@localhost nfs]# cat /etc/exports  
  3. /nfs   192.168.122.0/24(rw,sync) 
  4.                         (ro,sync) 
  5.               *.example.com(rw,sync) 
  6. 1 /etc/init.d/nfs restart 
  7.  
  8. rpc.nfsd: writing fd to kernel failed: errno 111 (Connection refused) 
  9. 解決辦法: 
  10.  
  11. 1 /etc/init.d/rpcbind restart 
  12.  
  13. 2 #/etc/init.d/rpcbind start 
  14.  
  15.  
  16. [cc@bogon ~]$ showmount -e 192.168.122.44 
  17. clnt_create: RPC: Port mapper failure - Unable to receive: errno 113 (No route to host) 
  18. 關掉server的火牆 
  19. chmod 777 /nfs 
  20. [cc@bogon ~]$ showmount -e 192.168.122.44 
  21. Export list for 192.168.122.44: 
  22. /nfs 192.168.122.0/24 
  23. mount -t nfs 192.168.122.44:/nfs   /mnt 

可以設置開機自動掛載:vim /etc/fstab

192.168.122.44:/nfs    /mnt     nfs    defautls   0 0

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章