搭建NFS Server on CentOS 6.4

NFS Server side
1. Install Packages
   # yum install nfs-utils
2. Configure exportfs file
   #vim /etc/exports    //the direcotry /data is shared
#export /data to 192.168.1.0/24
#date: 24/06/13
#author: liushanhu
/data 192.168.1.0/24(rw,async,root_squash)
3. Start require services
   #/etc/init.d/rpcbind start        //rpcbind accepte port reservations from local RPC services.  These ports are then made available (or advertised) so the corresponding remote RPC services can access them. (note rpcbind need start first)
   #/etc/init.d/nfs start        //starts the NFS server and the appropriate RPC processes to service requests for shared NFS file systems.
   #/etc/init.d/nfslock start        //activates a mandatory service that starts the appropriate RPC processes which allow NFS clients to lock files on the server.
4. Configure start require services onboot
#chkconfig --level 345 nfs on
NFS Client side
Mount NFS server's exported directory
  # mount 192.168.1.7:/data /your_directory    //the NFS Server IP: 192.168.1.7


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