NFS,是由SUN公司研制的文件传输协议
NFS主要是采用远程过程调用RPC机制实现文件传输
安装:
yum install -y nfs-utils rpcbind
创建www-data共享文件夹
cd /usr/local/ mkdir data cd data mkdir www-data cd www-data
/etc/exports配置
vim /etc/exports
exports文件中写入:
/usr/local/data/www-data 192.168.163.132/24(rw,synf)
启动服务:
systemctl start nfs.service
systemctl start rpcbind service
设置开机启动:
systemctl enable nfs.service
systemctl enable rpcbind service
查看:
exportfs
节点服务器安装:
yum install -y nfs-utils showmount –e 192.168.163.132 mount 192.168.163.132: /usr/local/data/www-data /mnt
systemctl enable nfs.service #开机启动
systemctl enable rpcbind service #开机启动