ubuntu 9.10 NFS挂载设置
2010-06-20 22:38
363 查看
ubuntu 9.10 NFS挂载设置
2010-05-12 文章来源:互联网 浏览次数:153Ubuntu没有NFS和portmap 需要安装
服务器:
sudo apt-get install nfs-kernel-server portmap
修改 /etc/exports 增加以下内容
/work/nfs *(rw,sync,no_root_squash)
/work/nfs
为你要共享的文件夹
,*表示可以任何IP访问,当然也可以写上IP地址。rw表示读写访问,如果是只读的话,可改为ro。sync:数据同步写入内存和硬盘,也可以使用
async,此时数据会先暂存于内存中,而不立即写入硬盘。 no_root_squash:NFS 服务器共享目录用户的属性,如果用户是
root,那么对于这个共享目录来说就具有 root 的权限。
也可以启用保护机制,
可以通过设定/etc/hosts.deny和/etc/hosts.allow文件来限制网络服务的存取权限。
***/etc/hosts.deny***
portmap:ALL
lockd:ALL
mountd:ALL
rquotad:ALL
statd:ALL
***/etc/hosts.allow***
portmap:192.168.1.101
lockd:192.168.1.101
mountd:192.168.1.101
rquotad:192.168.1.101
statd:192.168.1.101
第一个文件表示阻止的IP 第二个文件表示开放的IP
同时使用这两个文件就会使得只有ip为192.168.1.101的机器使用NFS服务
不过以上我都没有设置
接着重启portmap和nfs
sudo /etc/init.d/portmap start
sudo /etc/init.d/nfs-kernel-server start
然后可以测试是否能nfs 我的主机IP是 192.168.1.100 客户端的IP是192.168.1.230(服务器和客户端要同一IP段)
在服务器主机里输入
sudo mount -t nfs 192.168.1.100:/work/nfs /mnt/nfs
然后就可以在 /mnt/nfs下看到 /work/nfs 的东西了
客户端:
sudo apt-get install nfs-common
mount -t nfs -o nolock 192.168.1.100:/work/nfs /mnt/nfs
然后客户端上也可以找到主机上的东西了
相关文章推荐
- ubuntu 9.10 NFS挂载设置
- ubuntu9.10 虚拟机连接windows网络上网,以及NFS挂载网络设置。
- ubuntu9.10 NFS设置
- ubuntu 14.04 安装设置nfs服务,好让单板挂载使用
- 天嵌TQ210宿主机ubuntu挂载NFS文件系统详细步骤
- Virtualbox虚拟机Ubuntu系统设置共享文件夹及自动挂载
- Ubuntu设置开机自动挂载所有格式硬盘分区
- Ubuntu Server 12.04 NFS 文件共享设置
- ubuntu下设置开机自动挂载硬盘
- Ubuntu设置开机自动挂载所有格式硬盘分区
- Ubuntu 11.04 NFS 设置
- Ubuntu 9.10 IP地址设置
- ubuntu 9.10 下挂载windows ntfs分区
- ubuntu 7.10 NFS(Network File System, 网络文件系统)安装设置步骤
- ubuntu挂载NFS步骤(arm6410开发板)
- Ubuntu设置开机自动挂载Windows硬盘分区
- 虚拟机ubuntu10.04挂载nfs
- ubuntu挂载NFS系统 开发板Mini210
- 转: ubuntu配置NFS,挂载开发板
- Ubuntu 9.10设置摘要