ImageVerifierCode 换一换
格式:DOCX , 页数:10 ,大小:19.40KB ,
资源ID:8246638      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/8246638.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(搭建NFS服务器Setup NFS Server.docx)为本站会员(b****6)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

搭建NFS服务器Setup NFS Server.docx

1、搭建NFS服务器Setup NFS Server搭建NFS服务器(Setup NFS Server) NFS(Network File System)是一种在Unix/Linux下广泛使用的网络文件系统。Linux的内核已经内置了对NFS客户端和服务器的支持。但是播放机的内核没有打开NFS服务器支持,因此我们需要自己编译相关的模块。另外我们还需要相应的辅助程序:portmap和nfs-utils。其中nfs-utils要求C程序库包含对RPC的支持,然而播放机的uclibc没有打开RPC支持。下面我将介绍如何解决这些问题。一、编译内核NFS服务器模块仍然使用从华硕下载的内核源码,请参考:下载源

2、代码(Download The Source Code)内核源码目录下有一个名为config.develop.avhdd.mars.old的文件,我们以这个配置文件为基础重新配置内核:$ cd linux-2.6.12$ cp config.develop.avhdd.mars.old .config$ make menuconfig1. 关闭模块版本检查,使得我们编译的模块可以在原厂内核上加载。配置菜单位置: Loadable module support -> Module versioning support (EXPERIMENTAL)2. 打开NFS服务器支持,选择把它编译成模

3、块。配置菜单位置:File systems -> Network File Systems -> M NFS server support3. 打开或关闭内核调试。这个一定要与你的播放机内核的实际配置保持一致,否则编译出的模块会无法加载。Kernel hacking -> ? Kernel debugging然后执行make进行编译。编译完成后我们得到以下两个模块:fs/exortfs/exportfs.kofs/nfsd/nfsd.ko附件:编译好的模块:nfs-server-modules-debug.tar.bz2 (打开内核调试)nfs-server-modules-

4、nodebug.tar.bz2 (关闭内核调试)二、打开uClibc对RPC的支持NFS的通讯协议是基于ONC RPC(一种远程过程调用协议)的。nfs-utils工具调用了C函数库的RPC函数,因此要求uClibc必需提供这些函数。原厂固件中的uClibc关闭了RPC支持,我们只能用自己编译的支持RPC的uClibc来替换原厂的uClibc。其实在编译Buildroot时就会自动编译uClibc,请参考:Buildroot - 让交叉编译更轻松。我们只需在配置buildroot时指定uClibc的配置文件,这个配置文件应该包括下面两项:UCLIBC_HAS_RPC=yUCLIBC_HAS_F

5、ULL_RPC=y对应的uClibc的配置菜单如下图:附件:补丁:uClibc-0.9.28-patches.tar.bz2配置文件:config-uClibc-0.9.28.bz2编译好的uClibc:uClibc-0.9.28-binary.tar.bz2三、编译辅助程序为了方便链接上述的uClibc,请使用buildroot生成的工具链来编译portmap和nfs-utils。详细步骤请看:编译portmap和nfs-utils附件:编译好的portmap和nfs-utils:portmap_and_nfs-utils_binary.tar.bz2四、更新固件用以上三步编译产生的二进制文

6、件制作新固件:1. 内核模块放在如下路径:lib/modules/2.6.12.6-VENUS/kernel/fs/exportfs/exportfs.kolib/modules/2.6.12.6-VENUS/kernel/fs/nfsd/nfsd.ko2. 用自己编译的uClibc替换原厂的uClibc,放在/lib下:/lib/libm.so.0 -> libm-0.9.28.so/lib/libresolv.so.0 -> libresolv-0.9.28.so/lib/libpthread-0.9.28.so/lib/libnsl.so.0 -> libnsl-0.9

7、.28.so/lib/ld-uClibc-0.9.28.so/lib/libutil.so.0 -> libutil-0.9.28.so/lib/libcrypt-0.9.28.so/lib/libm-0.9.28.so/lib/libutil-0.9.28.so/lib/ld-uClibc.so.0 -> ld-uClibc-0.9.28.so/lib/librt-0.9.28.so/lib/libuClibc-0.9.28.so/lib/libdl-0.9.28.so/lib/libresolv-0.9.28.so/lib/libcrypt.so.0 -> libcryp

8、t-0.9.28.so/lib/libdl.so.0 -> libdl-0.9.28.so/lib/libnsl-0.9.28.so/lib/libpthread.so.0 -> libpthread-0.9.28.so/lib/libc.so.0 -> libuClibc-0.9.28.so/lib/librt.so.0 -> librt-0.9.28.so3. portman,nfs-utils及脚本/etc/init.d/S60nfs/sbin/portmap/usr/sbin/exportfs/usr/sbin/rpc.mountd /usr/sbin/rpc.

9、nfsd/usr/sbin/rpc.statd参考:1. 下载源代码(Download The Source Code)2. 重新编译uClibc3. 编译portmap和nfs-utils4. Buildroot - 让交叉编译更轻松posted on 2010-11-04 15:30 gouzhuang 阅读(4151) 评论(24) 编辑 收藏 引用 所属分类: 嵌入式Linux评论# re: 搭建NFS服务器(Setup NFS Server)2010-11-09 00:43nfs-setuphello-Thank you for your hard work and great tu

10、torials.I am having trouble getting the nfs mount to work.Can you share your media players:/etc/exportsand how you have setup your ubuntu pc to mount the share?Thanksin Chinese from translate.google:你好,感谢你们的辛勤工作和伟大的教程。我遇到麻烦NFS挂载工作。你能分享您的媒体播放器的:/ etc / exports中以及您如何设置您的Ubuntu电脑装入分享?谢谢 回复 更多评论 # re: 搭

11、建NFS服务器(Setup NFS Server)2010-11-09 03:54kernel-module-compilingwhen I try to compile / make the asus oplay kernel using the buildroot (built as described in your tutorial) I get a lot of errors and the compilation fails.当我尝试编译/使华硕oplay内核使用buildroot(内置在您的教程中介绍)我得到了很多错误和编译失败。user111acer-1810t:/asus-o

12、play-kernel/linux-2.6.12$ PATH=/home/user111/buildroot-2009.11/output/staging/usr/bin:$PATH make CHK include/linux/version.h CC scripts/mod/empty.o HOSTCC scripts/mod/mk_elfconfig MKELF scripts/mod/elfconfig.h HOSTCC scripts/mod/file2alias.o HOSTCC scripts/mod/modpost.o HOSTCC scripts/mod/sumversion

13、.oscripts/mod/sumversion.c: In function parse_file:scripts/mod/sumversion.c:260: warning: pointer targets in passing argument 1 of grab_file differ in signedness.(cut out a lot of errors | 切出了很多错误)./usr/include/stdlib.h:184: note: expected const char * _restrict_ but argument is of type unsigned cha

14、r * CC arch/mips/kernel/offset.sarch/mips/kernel/offset.c: In function output_mm_defines:arch/mips/kernel/offset.c:227: error: invalid asm: invalid use of %xarch/mips/kernel/offset.c:228: error: invalid asm: invalid use of %xarch/mips/kernel/offset.c:229: error: invalid asm: invalid use of %xmake1:

15、* arch/mips/kernel/offset.s Error 1make: * arch/mips/kernel/offset.s Error 2Do you have any ideas what I might be doing wrong?你有什么想法我可能是做错了什么? 回复 更多评论 # re: 搭建NFS服务器(Setup NFS Server)2010-11-09 10:52gouzhuangnfs-setupsuppose your PC is on network 192.168.1.0/24, put the following line in /etc/export

16、s/tmp/usbmounts/sda1 192.168.1.0/24(rw,sync,no_subtree_check)or you can run the following on command line:# exportfs -o rw,sync,no_subtree_check 192.168.1.0/24:/tmp/usbmounts/sda1Mount nfs on you ubuntu PC:# mount -t nfs -o udp <ip of you player>:/tmp/usbmounts/sda1 /mnt 回复 更多评论 # re: 搭建NFS服务器

17、(Setup NFS Server)2010-11-09 10:57gouzhuangkernel-module-compilingYou are using the wrong compiler. To compile kernel, you have to use the compiler for kernel: mipsel-linux-sdelinux 6.03.01-1, which was install at /usr/bin/mipsel-linux-gccThe buildroot compiler should be used to compile application

18、only. 回复 更多评论 # re: 搭建NFS服务器(Setup NFS Server)2010-11-29 23:59nfs-setupgouzhuangStill cant get nfs-server offerings to mount.I get:Unknown error 521When I try to mount using ubuntu 10.10Does the compiled nfsserver module require an older nfs client to work?That is, if the nfsserver is version 3, doe

19、s the nfs client have to be version 3 as well?Thank you for your hard work,nfs-setup 回复 更多评论 # re: 搭建NFS服务器(Setup NFS Server)2010-11-30 09:08gouzhuangnfs-setupPlease check if portmap, rpc.statd, rpc.mountd, rpc.nfsd is running on your player.If all the above daemons are running, then what is the out

20、put of exportfs -v?On you ubuntu PC, run showmount -e <your player ip>, does it output anything?nfs client does not have to be version 3, it can detect the server version and use the correct one. 回复 更多评论 # re: 搭建NFS服务器(Setup NFS Server)2011-03-23 17:29ygao2004我用你所编译好的nfs文件去替换, rpc.nfsd没有运行,运行S

21、60nfs,出现mount: Mounting nfsd on /proc/fs/nfsd failed: No such device 回复 更多评论 # re: 搭建NFS服务器(Setup NFS Server)2011-03-23 22:14gouzhuangygao2004你加载了nfs内核模块了吗? 回复 更多评论 # re: 搭建NFS服务器(Setup NFS Server)2011-03-23 22:30ygao2004gouzhuanginsmod nfsd.koinsmod exports.kodmesg 未有错误ubuntu: sudo mount -t nfs -o

22、nolock 192.168.1.103:/tmp/hdd/root /tmp/goodrpcinfoshowmount看起来都正常现在则出现:mount.nfs: mount to NFS server 192.168.1.103 failed: System Error: Connection refused 回复 更多评论 # re: 搭建NFS服务器(Setup NFS Server)2011-03-23 22:39gouzhuangygao2004播放机上exportfs -v显示什么? 回复 更多评论 # re: 搭建NFS服务器(Setup NFS Server)2011-03-

23、23 22:44ygao2004gouzhuang/tmp/hdd/root/opt/etc/init.d # exportfs -v/tmp/hdd/root 192.168.1.*(rw,async,wdelay,no_root_squash,no_subtree_check) 回复 更多评论 # re: 搭建NFS服务器(Setup NFS Server)2011-03-23 22:50gouzhuangygao2004请用192.168.1.0/24替换192.168.1.* 回复 更多评论 # re: 搭建NFS服务器(Setup NFS Server)2011-03-23 22:5

24、4ygao2004gouzhuang/tmp/hdd/root/opt/etc/init.d # exportfs -v/tmp/hdd/root 192.168.1.0/24(rw,async,wdelay,no_root_squash,no_subtree_check)/tmp/hdd/root/opt/etc/init.d # ./S60nfs reloadubuntuubuntu:/tmp$ sudo mount -t nfs -o nolock 192.168.1.103:/tmp/hdd/root /tmp/goodmount.nfs: mount to NFS server 19

25、2.168.1.103 failed: System Error: Connection refusedu 回复 更多评论 # re: 搭建NFS服务器(Setup NFS Server)2011-03-23 23:19gouzhuangygao2004不要执行./S60nfs reload,它会重置共享的文件系统。 回复 更多评论 # re: 搭建NFS服务器(Setup NFS Server)2011-03-24 08:17ygao2004gouzhuangexportfs: No versions for exported symbols. Tainting kernel.Install

26、ing knfsd (copyright (C) 1996 okirmonad.swb.de).本地自行mount,也没办法 # mount -t nfs -o nolock192.168.1.103:/tmp/hdd/root /tmp/goodmount: 192.168.1.103:/tmp/hdd/root is write-protected, mounting read-onlymount: Mounting 192.168.1.103:/tmp/hdd/root on /tmp/good failed: Permission denied 回复 更多评论 # re: 搭建NFS服

27、务器(Setup NFS Server)2011-03-24 08:25gouzhuangygao2004有点乱,请重新描述你的问题。请按顺序列出你的操作及输出信息,并指明操作是在播放机上还是在PC上。 回复 更多评论 # re: 搭建NFS服务器(Setup NFS Server)2011-03-24 08:37ygao2004gouzhuang我无法在系统下kernel/fs/等自起动装载,只能手动insmod,而且只能在播放机起动后insmod exports.ko然后insmod nfsd.ko最后60nfs发现rpc.nfsd没起动就手动起动,rpc.nfsd这时在ubuntu上sh

28、owmout rpcinfo 的输出与正常无区别但是不能mount,无论在播放器上,还是ubuntu上我有一扫描程序,对nfs 端口对2049的扫描非常慢,提示connection error. 回复 更多评论 # re: 搭建NFS服务器(Setup NFS Server)2011-03-24 08:40ygao2004对nfs tcp 2049非常慢,但nfs udp 2049显示正常 回复 更多评论 # re: 搭建NFS服务器(Setup NFS Server)2011-03-24 19:23gouzhuangygao2004试一下给mount命令加上 -o udp 参数。如果还是不行

29、,我也没办法了。 回复 更多评论 # re: 搭建NFS服务器(Setup NFS Server)2011-03-24 19:59ygao2004gouzhuang不试了,我想也不会行的 回复 更多评论 # re: 搭建NFS服务器(Setup NFS Server)2011-03-31 07:58ygao2004Xtreamer Linux Kernel, based on official 2.6.12 回复 更多评论 # re: 搭建NFS服务器(Setup NFS Server)2011-09-13 18:48uraganHello,where can I find this manu

30、al in english?Thanks! 回复 更多评论 # re: 搭建NFS服务器(Setup NFS Server)2011-09-15 21:26John请教一个问题,我在锋哲V6T上已经 mount 一个NFS服务器上的共享文件夹,挂载到 /tmp/ramfiles/. 下的一个文件夹,但是怎么样才能用遥控器通过视频界面来播放它呢?能告诉我吗?感激不尽。 回复 更多评论 # re: 搭建NFS服务器(Setup NFS Server)2011-09-16 14:23gouzhuangJohn简单的方法是:如果你的硬盘是ext3文件系统,可以在硬盘目录下建一个符号连接:ln -s /tmp/ramfiles /tmp/usbmounts/sda1

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1