概念
NFS(Network File System)即网络文件系统,是FreeBSD支持的文件系统中的一种,它允许网络中的计算机之间通过TCP/IP网络共享资源。在NFS的应用中,本地NFS的客户端应用可以透明地读写位于远端NFS服务器上的文件,就像访问本地文件一样,熟悉windows的可以把它看成windows的磁盘映射
环境
nfs服务ip | 客户端网段 |
---|---|
172.23.1.51 | 172.23.1.0 |
服务端安装配置
服务端安装
1 | sudo yum install nfs-utils rpcbind -y |
启动服务
先启动rpcbind,再启动nfs服务
1 | sudo /etc/init.d/rpcbind start && sudo /etc/init.d/nfs start |
配置访问规则
下面👇规则的意思就是 允许172.23.1.0网段的客户机挂载/mds目录,权限为读写
1 | vim /etc/export |
重启nfs服务
1 | sudo /etc/init.d/nfs reload |
客户端挂载
挂载172.23.1.51到本地/data目录
1 | mkdir /data |
- 本文作者: ChuLinx
- 本文链接: http://yoursite.com/2019/02/13/nfs服务配置小记/
- 版权声明: 本博客所有文章除特别声明外,均采用 MIT 许可协议。转载请注明出处!