一、NFS网络文件系统
- 依赖于RPC(远程过程调用)
- 需要安装nfs-utils、rpcbind软件包
- 系统服务:nfs、rpcbind
- 共享配置文件:/etc/exports
二、安装nfs-utils、rpcbind软件包
yum -y install nfs-utils rpcbind
systemctl enable nfs
systemctl enable rpcbind
三、设置共享目录
mkdir -p /opt/wwwroot
vi /etcexports
/opt/wwwroot 192.168.10.0/24(rw,sync,no_root_squash)
##sync是服务器和客户机之间开启同步
##no_root_squash:表示可以是root身份访问服务器
/var/ftp/[ub 192.168.10.10(ro) 192.168.10.20(rw)
##ro:权限是只读
##rw:权限是读写
四、启动NFS服务程序,查看本机发布的NFS共享目录
systemctl start rpcbind
systemctl start nfs
netstat -anpt | grep rpc
##查看NFS共享目录是否发布
showmount -e
五、启动rpcbind服务
systemctl enable rpcbind
systemctl star rpcbind
showmount -e