菠菜网站出租与ubuntu配置NFS

在虚拟机上的服务器Ubuntu(开发板客户端):菠菜网站出租【企 娥:217 1793 408】

$sudo apt-get install nfs-kernel-server

安装NFS,Ubuntn上默认没有安装

$mkdir share

创建共享目录。在开发板上用mount将服务器上的share挂载到开发上用于挂载的目录,我用/mnt/nfs

$chmod 777 -R share/

保证使用者(开发板)使用share下(已经挂载到/mnt/nfs,可以看到/mnt/nfs下的东西和服务器的share)的东西都能够读、写、执行

$sudo vim /etc/exports

修改NFS配置文件

添加:

/home/ljh/share *(rw,sync,no_root_squash,no_subtree_check)

解析:
/home/ljh/share:服务器要共享的目录

  • :所有人都能访问,虽然可以设ip,但为了以后不用去改,建议用“*”
    (rw,sync,no_root_squash,no_subtree_check):

rw:读/写权限

猜你喜欢

转载自blog.51cto.com/13917134/2157130
今日推荐