进行DFS服务器的安装:
sudo apt-get install nfs-kernel-server
如果安装不了
使用命令 :apt-get install update 出现大量的忽略和无法下载,404错误,这时候就是更新源出问题了,要换新的更新源
.sudo cp /etc/apt/sources.list /etc/apt/sources.list.bk
sudo gedit /etc/apt/sources.list
把sources.list里面的内容换成如下所示:
1 #deb cdrom:[Ubuntu 10.10 _Maverick Meerkat_ - Release i386 (20101007)]/ maverick main restricted
2 # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
3 # newer versions of the distribution.
4
5
6 deb http://old-releases.ubuntu.com/ubuntu/ maverick main restricted
7 deb-src http://old-releases.ubuntu.com/ubuntu/ maverick main restricted
8
9 ## Major bug fix updates produced after the final release of the
10 ## distribution.
11 deb http://old-releases.ubuntu.com/ubuntu/ maverick-updates main restricted
12 deb-src http://old-releases.ubuntu.com/ubuntu/ maverick-updates main restricted
13
14 ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
15 ## team. Also, please note that software in universe WILL NOT receive any
16 ## review or updates from the Ubuntu security team.
17 deb http://old-releases.ubuntu.com/ubuntu/ maverick universe
18 deb-src http://old-releases.ubuntu.com/ubuntu/ maverick universe
19 deb http://old-releases.ubuntu.com/ubuntu/ maverick-updates universe
20 deb-src http://old-releases.ubuntu.com/ubuntu/ maverick-updates universe
21
22 ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
23 ## team, and may not be under a free licence. Please satisfy yourself as to
24 ## your rights to use the software. Also, please note that software in
25 ## multiverse WILL NOT receive any review or updates from the Ubuntu
26 ## security team.
27 deb http://old-releases.ubuntu.com/ubuntu/ maverick multiverse
28 deb-src http://old-releases.ubuntu.com/ubuntu/ maverick multiverse
29 deb http://old-releases.ubuntu.com/ubuntu/ maverick-updates multiverse
30 deb-src http://old-releases.ubuntu.com/ubuntu/ maverick-updates multiverse
31
32 ## Uncomment the following two lines to add software from the 'backports'
33 ## repository.
34 ## N.B. software from this repository may not have been tested as
35 ## extensively as that contained in the main release, although it includes
36 ## newer versions of some applications which may provide useful features.
37 ## Also, please note that software in backports WILL NOT receive any review
38 ## or updates from the Ubuntu security team.
39 # deb http://cn.archive.ubuntu.com/ubuntu/ maverick-backports main restricted universe multiverse
40 # deb-src http://cn.archive.ubuntu.com/ubuntu/ maverick-backports main restricted universe multiverse
41
42 ## Uncomment the following two lines to add software from Canonical's
43 ## 'partner' repository.
44 ## This software is not part of Ubuntu, but is offered by Canonical and the
45 ## respective vendors as a service to Ubuntu users.
46 # deb http://archive.canonical.com/ubuntu maverick partner
47 # deb-src http://archive.canonical.com/ubuntu maverick partner
48
49 ## This software is not part of Ubuntu, but is offered by third-party
50 ## developers who want to ship their latest software.
51 deb http://old-releases.ubuntu.com/ubuntu/ maverick main
52 deb-src http://old-releases.ubuntu.com/ubuntu/ maverick main
53
54 deb http://old-releases.ubuntu.com/ubuntu/ maverick-security main restricted
55 deb-src http://old-releases.ubuntu.com/ubuntu/ maverick-security main restricted
56 deb http://old-releases.ubuntu.com/ubuntu/ maverick-security universe
57 deb-src http://old-releases.ubuntu.com/ubuntu/ maverick-security universe
58 deb http://old-releases.ubuntu.com/ubuntu/ maverick-security multiverse
59 deb-src http://old-releases.ubuntu.com/ubuntu/ maverick-security multiverse
其实就是将原来的更新源的地址换成http://old-releases.ubuntu.com/,因为老旧的软件包已经全部放在这里了。
解决后就可以下载安装了。
接下来:
配置portmap:
/home/share *(rw,sync,no_root_squash)
前面的目录就是你的共享目录了,括号里的是一些权限,如果感兴趣自己百度一下。注意的是,*和括号不能有空格.
编译后,sudo exportfs -r,使更改生效。
5、重启NFS服务
sudo /etc/init.d/nfs-kernel-server restart
sudo/etc/init.d/portmap restart
这时候基本就可以了。
在本地磁盘测试一下:
sudo mount 192.168.2.104:/home/share /mnt
如果挂接成功的话,/home/share 与/mnt d内容是一样的
使用umount就可以解除挂接
在开发板上测试:
首先连接上网线,测试一下开发板跟电脑是否能够ping通,如果ping不通自己百度找下原因先,下面是假设电脑是可以ping通的:
mount serverip:/home/share /mnt
其中serverip是你的电脑ip,后面跟着“:”,千万不要漏了,/home/share 则是主机上的共享目录,
如果成功的话,我们就可以在/mnt上看到共享目录的内容了