环境
两台centos服务器
192.168.5.102服务端
192.168.5.103客户端
搭建
服务端
yum install -y nfs-utils #安装
systemctl stop firewalld
systemctl disable firewalld#关闭防火墙
sed -i ‘s#SELINUX=disabled#SELINUX=enforcing#g’ /etc/selinux/config#关闭selinux
systemctl start nfs#开启nfs
vim /etc/exports
/media *(rw)#设置所有主机访问/media目录
chmod 777 /media#授权
客户端
yum install -y nfs-utils #安装
showmount -e 192.168.5.102#查看nfs搭建的共享目录
mount 192.168.5.102:/media /mnt/media#挂载
来源:CSDN
作者:独壹@无贰
链接:https://blog.csdn.net/qq_45206551/article/details/104844129