ubuntu nfs 服务器搭建

ubuntu nfs 服务器搭建ubuntu下nfs服务器搭建及挂载测试

参考资料:朱老师物联网大讲堂嵌入式linux一期课程,环境搭建相关资料(微信搜索“朱老师物联网大讲堂”,关注公众号可下载相关资料)

前言

一、安装nfs

sudo 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

今天的文章ubuntu nfs 服务器搭建分享到此就结束了,感谢您的阅读。

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
如需转载请保留出处:http://bianchenghao.cn/9705.html

(0)
编程小号编程小号

相关推荐

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注