luther@gliethttp:~$ sudo apt-get install nfs-kernel-server
luther@gliethttp:~$ sudo vim /etc/exports
# 追加如下内容
/vobs/nfs 192.168.1.*(rw,sync,no_root_squash)
luther@gliethttp:~$ sudo service nfs-kernel-server restart
* Stopping NFS kernel daemon [ OK ]
* Unexporting directories for NFS kernel daemon... [ OK ]
* Exporting directories for NFS kernel daemon... exportfs: /etc/exports [1]: Neither 'subtree_check' or 'no_subtree_check' specified for export "192.168.1.*:/vobs/nfs".
Assuming default behaviour ('no_subtree_check').
NOTE: this default has changed since nfs-utils version 1.0.x
[ OK ]
* Starting NFS kernel daemon [ OK ]
luther@gliethttp:~$
现在我们可以在我们的ubuntu 8.10主机上测试nfs是否正常启动.
luther@gliethttp:~$ mkdir gliethttp
luther@gliethttp:~$ sudo mount -t nfs 192.168.1.101:/vobs/nfs gliethttp
luther@gliethttp:~$ ll gliethttp/
total 0
-rw-r--r-- 1 luther luther 0 2009-08-03 23:55 a.c
luther@gliethttp:~$
成功挂载a.c文件就是/vobs/nfs定义的一个测试文件,向/vobs/nfs追加内容,可以直接在gliethttp/目录下
看到,同样对gliethttp/作任何的操作,也将直接反应到挂载的/vobs/nfs目录上[luther.gliethttp].
最后配置linux 2.6.30-4的启动参数为:
console=ttyAM0,115200 root=/dev/nfs nfsroot=192.168.1.101:/vobs/nfs ip=192.168.1.150:192.168.1.101:192.168.1.1:255.255.255.0
这样就可以直接挂载/vobs/nfs目录了.[luther.gliethttp]
阅读(1431) | 评论(0) | 转发(0) |