Linux之nfs部署
1. nfs 部署
一服务端配置 NFS
1 服务端安装NFS
CentOS 上使用 NFS 服务,需要安装两个包(nfs-utils 和 rpcbind), 不过当使用 yum 安装nfs-utils 时会把 rpcbind 一起安装上:
# yum install -y nfs-utils
运行结果如下,安装成功。

2.修改配置文件
#vim /etc/exports

3.启动服务
# service rpcbind start
# service nfs start

4.查看服务器端共享目录
# exportfs

5.查看**的portnumber
# netstat -antup

6 关闭防火墙
#service iptables stop

二.NFS客户端的使用方法
1.安装软件包
# yum install rpcbind
# yum install nfs-utils


3.挂载服务器共享目录并查看挂在是否成功。
# mkdir /test
# mount -t nfs -o nolock 192.168.48.133:/tmp/ /test/
# df -h

如上图所示,共享文件夹已挂载成功了。
一服务端配置 NFS
1 服务端安装NFS
CentOS 上使用 NFS 服务,需要安装两个包(nfs-utils 和 rpcbind), 不过当使用 yum 安装nfs-utils 时会把 rpcbind 一起安装上:
# yum install -y nfs-utils
运行结果如下,安装成功。
2.修改配置文件
#vim /etc/exports
3.启动服务
# service rpcbind start
# service nfs start
4.查看服务器端共享目录
# exportfs
5.查看**的portnumber
# netstat -antup
6 关闭防火墙
#service iptables stop
二.NFS客户端的使用方法
1.安装软件包
# yum install rpcbind
# yum install nfs-utils
2.查看服务器共享目录
# showmount -e 192.168.48.1333.挂载服务器共享目录并查看挂在是否成功。
# mkdir /test
# mount -t nfs -o nolock 192.168.48.133:/tmp/ /test/
# df -h
如上图所示,共享文件夹已挂载成功了。