server:
yum -y install nfs-utils
chmod -Rf 777 /srs/trunk/objs/nginx/html/live
vi /etc/exports
/srs/trunk/objs/nginx/html/live 192.168.56.6(rw,sync,root_squash)
systemctl restart rpcbind
systemctl enable rpcbind
systemctl start nfs-server
systemctl enable nfs-server
client:
yum -y install nfs-utils
showmount -e 192.168.56.6
mkdir /home/anosi/live
mount -t nfs 192.168.56.6:/srs/trunk/objs/nginx/html/live /home/anosi/live //临时挂载,要想开机启动,加入fstab中实现
vi /etc/fstab
192.168.56.6:/public /mnt/public nfs defaults 0 0
学习点: