nfs
1.安装NFS服务器
sudo apt-get install nfs-kernel-server (安装nfs-kernel-server时,apt会自动安装nfs-common和portmap)
2.配置nfs
1.修改配置文件
sudo vim /etc/exports
在末尾一行加入 /home/arm/nfs *(rw,sync,no_root_squash,no_subtree_check)
2.使配置生效
sudo exportfs -rv
3.设置 /home/nfs目录权限
sudo chmod 777 /home/arm/nfs -R
3.重启服务
sudo /etc/init.d/rpcbind restart 重启portmap,后面最新的版本都rpcbind重启
sudo /etc/init.d/nfs-kernel-server restart 重启nfs服务
showmount -e 显示共享出的目录
4.本地挂载 (选其一即可)
sudo mount -t nfs 本机IP地址:/home/arm/nfs /mnt
sudo mount 127.0.0.1:/home/arm/nfs /mnt
5.远程挂载 (选其一即可)
mount -t nfs 192.168.1.100:/home/arm/nfs /mnt
busybox mount -o nolock -t nfs 192.168.1.100:/home/arm/nfs /mnt
----------------------------------------我是漂亮的分割线------------------------------------------------------
ubuntu下nfs安装配置
https://jingyan.baidu.com/article/59a015e30215a5f7948865f1.html
NFS挂载失败: bad option; for several filesystems (e.g. nfs, cifs) you might need a /sbin/mount.
https://www.cnblogs.com/ruiy/p/12394754.html