ubuntu nfs
来源:互联网 发布:c语言 ip地址 合法性 编辑:程序博客网 时间:2024/05/21 15:05
获取软件
#sudo apt-getinstall nfs-kernel-server
打开/etc/exports文件,在末尾加入:
/rootfs*(rw,sync,no_root_squash)
注:nfs允许挂载的目录及权限,在文件/etc/exports中进行定义,各字段含义如下:
/rootfs:要共享的目录
*:允许所有的网段访问
rw:读写权限
sync:资料同步写入内在和硬盘
no_root_squash:nfs客户端共享目录使用者权限
重启服务:
#sudo /etc/init.d/portmaprestart
#showmount-e
注:nfs是一个RPC程序,使用它前,需要映射好端口,通过portmap设定
命令执行情况如下:
ad@ubuntu:~$sudo/etc/init.d/portmap restart
Rather than invoking initscripts through /etc/init.d, use the service(8)
utility, e.g. service portmap restart
Since the script you areattempting to invoke has been converted to an
Upstart job, you may also use the restart(8) utility, e.g. restartportmap
portmap start/running, process 474
ad@ubuntu:~$sudo/etc/init.d/nfs-kernel-serverrestart
ad@ubuntu:~$showmount-e
Export list for xgc-VirtualBox:
/rootfs*
现在可以在本机上试一下:
#sudo mount -t nfslocalhost:/rootfs
注:localhost为本机linux的IP地址
这样就把共享目录挂到了/mnt目录,取消挂载用:
#sudo umount /mnt
如果用在嵌入式设备上挂载,要加上参数-onolock
我在开发板上使用的挂载命令:
mount -t nfs -onolock localhost:/rootfs /mnt
我配置的时候发现/etc/default下没有portmap文件。
- ubuntu nfs
- ubuntu 开启nfs服务
- Ubuntu下 Nfs服务器安装
- ubuntu nfs
- ubuntu NFS
- ubuntu nfs
- ubuntu NFS
- ubuntu nfs
- Ubuntu nfs
- ubuntu NFS
- Ubuntu NFS
- nfs 启动Android
- nfs 启动Android
- Fedora16 使用NFS挂在
- ubuntu 配制nfs
- ubuntu中的NFS
- Ubuntu下nfs安装
- ubuntu nfs配置
- 多线程编程1
- 多线程编程2
- 多线程编程3
- TCP网络编程
- ARM工具ADS
- ubuntu nfs
- 环境变量的设置
- 关于keil编译51单片机(1<<16)运…
- (转载) 关于nor flash,nand flash…
- linux samba服务器设置
- VMware网络配置详解
- linux tftp设置 + uboot下tftp下载…
- ACM学习进阶计划
- ComboBoxPropertyDescriptor 使用注意事项