NFS简介:
NFS(Network File System)即网络文件系统,是FreeBSD支持的文件系统中的一种,它允许网络中的计算机之间通过TCP/IP网络共享资源。在NFS的应用中,本地NFS的客户端应用可以透明地读写位于远端NFS服务器上的文件,就像访问本地文件一样。
环境需要
centos6 系统
安装包 nfs rpcbind
开始搭建
1. yum安装nfs rpcbind
yum install nfs-utils rpcbind
![](https://i-blog.csdnimg.cn/blog_migrate/c4289c7d4b0a713b5fb33256ac3d7c1a.png)
2.设置创建本地共享目录 我的是nfs
mkdir /nfs
3.修改/etc/exports配置文件 假如我的服务端是3.100 客户端是3.200 添加如下
/nfs 192.168.3.200(rw)
4.重启服务 一定先启动 rpcbind
service rpcbind restart //nfs软件进程
service nfs restart //nfs进程
5.开启客户机 我开的windows
1.安装window下的nfs客户端
servermanagercmd.exe -install FS-NFS-Services
2.启动nfs客户端
net use /persistent:yes
3.挂载我的盘是Z
mount -u:root -p:centos 192.168.3.100:/nfs z:
二 Linux下的客户端 ip地址为 192.168.3.254
1.安装nfs-utils.
yum install nfs-utils
2.挂载nfs
mount -t nfs 192.168.3.100:/nfs nfs
![](https://i-blog.csdnimg.cn/blog_migrate/79435689acf744ea15577eff538d0b10.png)
欢迎打赏