1000字范文,内容丰富有趣,学习的好帮手!
1000字范文 > ubuntu nfs 服务器搭建

ubuntu nfs 服务器搭建

时间:2023-09-20 11:57:26

相关推荐

ubuntu nfs 服务器搭建

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

ubuntu nfs 服务器搭建

前言一、安装nfs二、配置/etc/exports三、 启用四、挂载测试

前言

一、安装nfs

sudo apt-get install nfs-kernel-serversudo 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/rootfssudo showmount -e//Show the NFS server's export listsudo 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

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。