开发板mount虚拟机遇到的问题 Connection refused , Permission denied,time out

开发板文件系统往往是只读的,要加文件可以采取挂载的方式,例如

mount -t nfs -o nolock 192.168.55.115:/home/ambavm/build/Base /usr/local

 

1.Connection refused

虚拟机安装nfs

sudo apt-get install nfs-kernel-server

2.Permission denied

查看防火墙状态 inactive是关闭

sudo ufw status

sudo ufw disable  //关闭防火墙

sudo ufw enable //打开防火墙

vi /etc/exports

添加下面的内容

/opt/nfs *(rw,sync,no_root_squash,no_all_squash,no_subtree_check)
/mnt 192.168.55*(rw,sync,no_subtree_check)
/tmp 192.168.55*(rw,sync,no_subtree_check)
/home/ambavm/build/Base 192.168.55*(rw,sync,no_subtree_check)
 

保存后退出

sudo exportfs

sudo service nfs-server stop

sudo service nfs-server start

sudo /etc/init.d/nfs-kernel-server restart

 

你可能感兴趣的:(开发板mount虚拟机遇到的问题 Connection refused , Permission denied,time out)