Ubuntu配置NFS
2013-12-05 09:31
302 查看
1.部署NFS Server端
1.1安装nfs-kernel-server
sudo apt-get install nfs-kernel-server1.2配置/etc/hosts.deny
vi /etc/hosts.deny#在文件中增加内容
###NFSDAEMONS
portmap:ALL
lockd:ALL
mountd:ALL
rquotad:ALL
statd:ALL
1.3配置/etc/hosts.allow
vi /etc/hosts.allow#在文件中增加内容
###NFSDAEMONS
portmap:客户端IP
lockd:客户端IP
rquotad:客户端IP
mountd:客户端IP
statd:客户端IP
1.4重启portmap deamon
/etc/init.d/portmap restart1.5配置/etc/exports
若将192.168.71.205的/home目录共享给192.168.71.46,在/etc/exports文件中添加/home 192.168.71.46(rw,sync,no_root_squash)
说明:
(1)rw是读写权限,只读为ro;
(2)sync数据同步写入内存和硬盘,async数据会先暂存在内存,而不立即写入硬盘;
(3)no_root_squash服务器共享目录用户的属性,如果用户是root,那么对于这个共享目录来说就具有root的权限
1.6重启NFS服务
/etc/init.d/nfs-kernel-serverrestart2.部署NFS client端
2.1安装nfs-common
sudo apt-get install nfs-common2.2挂载NFS
如:将192.168.71.205 NFS服务端的/home/挂载到192.168.71.46的NFS客户端上,在192.168.71.46机器上执行:mount-t nfs -o tcp,soft,intr,timeo=50,retrans=12, 192.168.71.205:/home /home/testclient(这两个目录必须是两台机器上已存在的)。
2.3检查挂载是否成功
df2.4卸载
unmount /home/testclient相关文章推荐
- 接收器和接收器链
- ASP.NET中在HTML中嵌入C#代码的方法
- (go) 上传文件ta3 专用(无多级目录)
- mysql 备忘
- JqueryeasyUI选项卡选择判定更改内部Iframe地址
- MySql实现rownum的sql语句
- 基于JAVA的简单界面设计:记事本
- java书籍推荐
- C++学习书籍推荐
- windows安全模式的作用、种类及功能详解
- SpringMVC Pojo类的Date类型应用问题
- Hadoop Map/Reduce教程
- REST on Rails指南
- 探寻“大数据驱动创新”的路径
- Android操作系统11种传感器介绍
- Unity3D 脚本支持中文
- 【Linux】limits.conf 不重启就生效或者不生效的原因
- gdi+ 在v6.0中按要求设置好了 怎么会出现这样的错误
- 关于android的nfc问题
- Excel导入数据库(三)——SqlBulkCopy