Ubuntu 11.04 NFS 配置
来源:互联网 发布:淘宝云客服选班网站 编辑:程序博客网 时间:2024/06/11 17:31
安装 NFS 相关组件
sudo apt-get install nfs-kernel-server
增加 NFS 目录
sudo gedit /etc/exports#在文件中添加如下内容/var/nfsboot *(rw,sync)
/var/nfsboot 为 NFS 共享目录,可自由指定
× 表示任意的 IP 地址都可以挂载此目录,若设置为 192.168.1.× 则表示只有在 192.168.1.??? 这个网段的 IP 才可以挂载
rw 可读写的权限
ro 只读的权限
no_root_squash NFS 客户端分享目录使用者的权限,即如果客户端使用的是 root 用户,那么对于这个共享的目录而言,该客户端就具有 root 的权限,若是以NFS挂载根文件系统时,必须设置此项
sync 资料同步写入到内存与硬盘当中
async 资料会先暂存于内存当中,而非直接写入硬盘
服务操作指令
# 停止sudo /etc/init.d/nfs-kernel-server stop# 启动sudo /etc/init.d/nfs-kernel-server start# 重新启动sudo /etc/init.d/nfs-kernel-server restart
测试
# 将 /var/nfsboot 目录挂在在 /mut 下# 挂载成功后可用 df 命令查看sudo mount 192.168.1.10:/var/nfsboot /mnt# 在嵌入式中挂载sudo mount -o nolock 192.168.1.10:/var/nfsboot /mnt# 移除挂载目录sudo umount /mnt
注意:
1.完成后如出现 access denied 异常,重新启动系统即可
2.在 ubuntu 11.10 中启动 nfs 服务时会遇到
* Not starting: portmapper is not running
解决方法:
sudo service portmap restartsudo /etc/init.d/nfs-kernel-server start
mount.nfs: access denied by server while mounting 一个解决办法
I googled and found that since the port is over 1024 I needed to add the "insecure" option to the relevant line in /etc/exports on the server. Once I did that (and ran exportfs -r), the mount -a on the client worked.
//如果端口号大于1024,则需要将 insecure 选项加入到配置文件(/etc/exports)相关选项中mount客户端才能正常工作:
查看 exports 手册中关于 secure 选项说明也发现确实如此
[root@lzgonline init.d]# man exports
secure,This option requires that requests originate on an Internet port less than IPPORT_RESERVED (1024). This option is on by default. To turn it off, specify insecure.
//secure 选项要求mount客户端请求源端口小于1024(然而在使用 NAT 网络地址转换时端口一般总是大于1024的),默认情况下是开启这个选项的,如果要禁止这个选项,则使用 insecure 标识
修改配置文件/etc/exports,加入 insecure 选项
/home/lzgonline/rootfs *(insecure,rw,async,no_root_squash)
保存退出
然后重启nfs服务:service nfs restart
然后问题就解决了
http://hi.baidu.com/alizee635_2012/item/a8c4d371f3bd7042ee1e53ec
- Ubuntu 11.04 NFS 配置
- Ubuntu 11.04 NFS 配置
- ubuntu nfs配置
- ubuntu 10.04 nfs配置
- ubuntu 9.04 配置 nfs
- ubuntu 10.04 NFS配置
- ubuntu NFS配置
- Ubuntu NFS配置
- ubuntu配置nfs步骤
- Ubuntu的NFS配置
- Ubuntu 10.10 NFS配置
- ubuntu 配置 nfs
- Ubuntu 10.10 NFS配置
- ubuntu 11.10 配置nfs
- ubuntu 11.10 配置nfs
- NFS配置 ubuntu
- ubuntu nfs 配置
- Ubuntu 11.10 NFS配置
- JAVA的helloworld
- 让UltraEdit成为java编译器
- 由zImage生成uImage
- android 第三方jar库 反射得到自己的资源ID
- 如何进行系统配置 ——了解DOS下的内存
- Ubuntu 11.04 NFS 配置
- ubuntu下动态链接库的编译和使用实例
- 编译、裁剪、安装、删除 Ubuntu内核和模块管理
- 裁剪Ubuntu内核和模块管理2
- ubuntu10.04 安装配置tftp服务
- Hadoop安装-jdk替换
- DM6446 uboot分析
- U-boot-1.1.4中关于hello_world.srec出错
- tms320dm6446内核启动分析