##NFS搭建
准备两台linux的虚拟机一个当服务器一个当客服端
现在服务器机安装nfs-ntils和rpcbind
[[email protected] ~]# yum -y install nfs-utls rpcbind
修改配置
[[email protected] ~]# vim /etc/exports
NFS(linux-linux)
[[email protected] ~]# cat /etc/exports
/home/gxy 192.168.1.111(rw)
创建一个目录并给权限
[[email protected] ~]# mkdir /home/gxy
[[email protected] ~]# chmod 777 /home/gxy
开启服务
[[email protected] ~]# systemctl start rpcbind

[[email protected] ~]# systemctl start nfs
关闭防火墙 降低沙盒等级

[[email protected] ~]# systemctl stop firewalld
[[email protected] ~]# setenforce 0

在客户端 安装 nfs-ntils 和rpcbind
[[email protected] ~]# yum -y install nfs-utils rpcbind
开启服务
[[email protected] ~]# systemctl start rpcbind

[[email protected] ~]# systemctl start nfs
检查客户端和网络
[[email protected] ~]# ping 192.168.1.143
客户端连接IP
[[email protected] ~]# showmount -e 192.168.1.143
Export list for 192.168.1.143:
/home/gxy 192.168.1.111
关闭防火墙 和降低沙盒
[[email protected] ~]# systemctl stop firewalld
[[email protected] ~]# setenforce 0
NFS(linux-linux)

相关文章: