需要两台配置好IP可以互相ping通的虚拟机
首先在服务器端,安装nfs的两个文件
开启nfs的全部服务
使用命令chkconfig --list nfs
chkconfig --list rpcbind
chkconfig nfs on
使用命令vim /etc/exports编辑当前服务下的主配置文件
赋予所有人可读可写权限,同步写入磁盘,建立好的文件以属root保存
创建share目录
重启服务 先重启rpcbind,后重启nfs服务
到客户机端
showmount -e localhost 检测能否连通
showmount -e 192.168.2.88(服务机IP)
mkdir /client 创建共享挂载目录
将两个目录挂载mount -t nfs 192.168.2.88:/share /client
df -h 查看是否挂载成功
到服务器端share目录下touch一个文件,到