Ubuntu10.10中NFS服务的安装及配置

来源:互联网 发布:centos 一键lnmp 编辑:程序博客网 时间:2024/05/22 01:41

转载:http://blog.163.com/ljf_gzhu/blog/static/1315534402010101752428326/

1. 安装NFS服务器端及客户端:

apt-get install nfs-kernel-server  nfs-common

一路回车即可。

2. 配置portmap:

dpkg-reconfigure portmap

运行后选择"NO"。

3. 配置挂载目录和权限:

gedit /etc/exports

在exports文件末尾添加若干目录项,我的配置如下:

/root/Desktop/easy2440/fs-nfs *(rw,sync,no_root_squash)
/root/Desktop/Schueco/fs-nfs *(rw,sync,no_root_squash)

4. 重新启动NFS服务:

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

5. 测试

假设主机Linux的IP地址为:192.168.1.22,

在目标板(easy2440)上执行:

mount  -o nolock 192.168.1.22:/root/Desktop/easy2440/fs-nfs /mnt

ls /mnt

比较easy2440的 /mnt 目录和主机的共享目录 /root/Desktop/easy2440/fs-nfs

我自己的第5步:

在开发板上设置并保存启动参数
在u-boot命令行下输入以下命令设置u-boot启动参数:
setenv bootargs "root=/dev/nfs nfsroot=192.168.0.231:/home/usr/linux

ip=192.168.0.232:192.168.0.231:192.168.0.201:255.255.255.0:eth0:off console=ttySAC0,115200"
saveenv
重新启动开发板,Linux内核启动后会自动挂载NFS文件系统。

原创粉丝点击