参考资料:朱老师物联网大讲堂嵌入式linux一期课程,环境搭建相关资料(微信搜索“朱老师物联网大讲堂”,关注公众号可下载相关资料)
ubuntu nfs 服务器搭建前言一、安装nfs二、配置/etc/exports三、 启用四、挂载测试
前言 一、安装nfssudo apt-get install nfs-kernel-server sudo apt-get install nfs-common二、配置/etc/exports
sudo vi /etc/exports 追加对应文件夹与相关参数: /root/porting_x210/rootfs *(rw,sync,no_root_squash,no_subtree_check)
对挂载文件夹权限进行修改
chmod 777 -R /root/rootfs sudo showmount -e//Show the NFS server's export list sudo exportfs -r// Reexport all directories, sudo showmount -e三、 启用
sudo /etc/init.d/nfs-kernel-server restart四、挂载测试
//将目标localhost:/root/rootfs挂载到本机/mnt //此时/mnt中将能操作localhost:/root/rootfs中的内容 mount -t nfs -o nolock localhost:/root/rootfs /mnt 卸载挂载点 umount /mnt



