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

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