ubuntu nfs的安装

nfs 安装(1)
apt-get install nfs-kernel-server
apt-get install portmap nfs-common
(2)
编辑/etc/exports
/opt/system/linux *(rw,sync,no_root_squash)
(3)

修改挂载点的属性

chmod 777 /opt/system/linux

(4)
重启nfs
sudo /etc/init.d/nfs-kernel-server restart
sudo /etc/init.d/portmap restart
(5)
在本机上测试


icegoly@icegoly:/opt/system/linux$ showmount -e
Export list for icegoly:
/opt/system/linux *


icegoly@icegoly:/opt/system$ sudo mount 127.0.0.1:/opt/system/linux /mnt


注:可以通过一个符号链接来export NFS目录,但在/etc/exports下所添加的挂载点应为真正的目录。比如建一符号链接
ln -s /home/pub/work/freerunner/out/target/product/freerunner /home/jgyang/nfsroot 
这样在开发板上设置的内核命令行中设置的NFS目录就可是:/home/jgyang/nfsroot,但在/etc/exports文件中 export出的目录应当是实际的NFS所在的目录,即/home/pub/work/freerunner/out/target/product/freerunner。
这样有两个好处,一是可以省去开发板中启动参数命令过长的麻烦;二是在重新编译android之后可以直接使用生成的NFS,而不必再重新拷贝一份。
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值