NFS_server: 192.168.1.101
NFS_client: 192.168.1.102
1、安装nfs
yum -y install nfs-utils rpcbind
2、创建共享目录
mkdir /test
3、共享目录配置
#cat /etc/exports /test 192.168.1.102(rw,sync,no_root_squash)
4、启动
#设置开机启动: chkconfig nfs on chkconfig rpcbind on #启动: sevice rpcbind start service nfs start
5、客户端设置
#安装nfs yum -y install nfs-utils #查看nfs-server共享目录 showmount -e 192.168.1.101 #设置共享到本地 mkdir /test mount -t nfs 192.168.1.101:/test /test #设置开机自动挂载: echo "192.168.1.101:/test /test nfs defaults 0 0" >>/etc/fstab
转载于:https://blog.51cto.com/cuixiang/1844394