1、安装nfs服务
> yum install -y nfs-utils
2、编辑exports文件,添加内容
vim /etc/exports
/disk/mftcc/nfs/ 10.2.10.0/255.255.255.0(rw,no_root_squash,no_all_squash,sync,anonuid=501,anongid=501)
:wq 保存退出
3、
先为rpcbind和nfs做开机启动:(必须先启动rpcbind服务)
> systemctl enable rpcbind.service
> systemctl enable nfs-server.service
然后分别启动rpcbind和nfs服务:
> systemctl start rpcbind.service
> systemctl start nfs-server.service
确认NFS服务器启动成功:
> exportfs -r
#使配置生效
> exportfs
#可以查看到已经ok
关闭centos7
> sudo systemctl stop firewalld
永久关闭centos7
> sudo systemctl disable firewalld
客户端挂载
10.48(微服务基础服务器)该文档仅指导1台客户机做说明,其他客户机使用方式不