您的位置:首页 > 其它

Ubuntu安装NFS服务器

2010-03-10 21:07 447 查看
一、NFS服务器安装



1、安装端口映射器(portmap)

$ sudo apt-get install portmap

2、安装NFS Server



$ sudo apt-get install nfs-kernel-server

3、安装NFS客户端



$ sudo apt-get install nfs-common

说明:nfs-kernel-server和nfs-common均依赖于portmap

二、配置



1、配置portmap

编辑/etc/default/portmap,将"-i 127.0.0.1"去掉;

2、配置/etc/hosts.deny

禁止任何host(主机)能和你的NFS服务器进行NFS连接。在该文件中加入:

### NFS DAEMONS

portmap:ALL

lockd:ALL

mountd:ALL

rquotad:ALL

statd:ALL

3、配置/etc/hosts.allow

允许那些你想要的主机和你的NFS服务器建立连接。

下列步骤将允许任何IP地址以192.168.1开头的主机连接到NFS服务器上,具体要看你目标板的端口地址,也可以指定特定的IP地址。在该文件中加入:

### NFS DAEMONS

portmap: 192.168.1.

lockd: 192.168.1.

rquotad: 192.168.1.

mountd: 192.168.1.

statd: 192.168.1.

4、配置/etc/exports



/home/s3c2440/root_nfs *(rw,sync,no_root_squash)

然后重启NFS服务:

$ sudo /etc/init.d/nfs-kernel-server restart

三、测试



mount -t nfs -o nolock 192.168.1.101:/home/s3c2440/root_nfs /mnt/root_nfs
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: