##NFS搭建
准备两台linux的虚拟机一个当服务器一个当客服端
现在服务器机安装nfs-ntils和rpcbind
[root@localhost ~]# yum -y install nfs-utls rpcbind
修改配置
[root@localhost ~]# vim /etc/exports
[root@localhost ~]# cat /etc/exports
/home/gxy 192.168.1.111(rw)
创建一个目录并给权限
[root@localhost ~]# mkdir /home/gxy
[root@localhost ~]# chmod 777 /home/gxy
开启服务
[root@localhost ~]# systemctl start rpcbind
[root@localhost ~]# systemctl start nfs
关闭防火墙 降低沙盒等级
[root@localhost ~]# systemctl stop firewalld
[root@localhost ~]# setenforce 0
在客户端 安装 nfs-ntils 和rpcbind
[root@localhost ~]# yum -y install nfs-utils rpcbind
开启服务
[root@localhost ~]# systemctl start rpcbind
[root@localhost ~]# systemctl start nfs
检查客户端和网络
[root@bogon ~]# ping 192.168.1.143
客户端连接IP
[root@bogon ~]# showmount -e 192.168.1.143
Export list for 192.168.1.143:
/home/gxy 192.168.1.111
关闭防火墙 和降低沙盒
[root@bogon ~]# systemctl stop firewalld
[root@bogon ~]# setenforce 0