Linux下使用NFS

 

#服务端的配置

 

#查看系统是否已经安装了nfs

rpm -qa | grep nfs

#如果没有安装,则使用以下命令进行安装

yum -y install nfs-utils rpcbind

#再次查看系统是否已经安装了nfs

rpm -qa | grep nfs

 

#然后编辑exports文件

vim /etc/exports

#对要共享的目录进行配置

    data/web/WebStatic/SuperGenius 192.168.1.0/24(rw,no_root_squash,no_all_squash,sync)

 

#保存,重新载入exports文件

exportfs -r

#重新启动nfs服务

service rpcbind restart

service nfs restart

 

 

#客服端配置

#使用mount命令加载共享目录

 

 mount -t nfs 192.168.1.96:/data/web/WebStatic/Sns /home/web/WebStatic/Sns

#此命令的意思是把96上的.../Sns目录mount到本地的../Sns下,即在本地的Sns下可以看到96服务

#器上的Sns下的所有文件

 

 

 

 

 

 

猜你喜欢

转载自1358440610-qq-com.iteye.com/blog/2073390
今日推荐