Linux NFS 使用总结
1. 服务器nfs的配置
2. 客户端nfs的配置
3. 使用nfs
3.1 作为共享文件系统mount
3.2 作为根文件系统mount
4.备 注
nfs是Network File System,基于RPC(Remote Procedure Call Protocol远程过程调用协议)实现。
1.服务器nfs的配置
1.1 startàsystem settingànfs添加共享路径、允许访问的客户端IP以及访问方式
添加之后则存到/etc/exports文件中,如:/home/rrhudp0216 128.0.0.*(rw,sync):网络上共享/home/rrhudp0216,允许128.0.0.*网段的所有IP可以读写访问该文件夹。
1.2 services nfs restart重启nfs
1.3 services portmap restart 重启portmap
1.4 services iptables stop 关闭防火墙
1.5 services iptables status 防火墙状态查看(确认防火墙被关闭)
2.客户端nfs的配置
2.1 makemenuconfigàFile SystemsàNetwork File Systems中选上
2.2 Network Application中选择portmap项
3.使用nfs
3.1 作为共享文件系统mount
系统起来之后:
#mkdir /var/nfs
#chmod 777 nfs
#mount –t nfs –o tcp 128.0.0.7:/home/rrhudp0216 /var/nfs
# ls
Makefile fmod.c rrh_init.c~
Makefile_bk freqnum.h rrh_init.h
Makefile~ frequency.h rrh_init.o
…
3.2 作为根文件系统mount
在U-boot下设置U-boot环境变量:
U-boot->setenv bootargs ‘root=/dev/nfs rw nfsroot=128.0.0.7:/home/rrhudp0216,proto=tcp,nfsvers=3,nolock ip=128.0.0.28:128.0.0.7:128.0.0.1:255.255.0.0::eth0:off’
系统启动之后
NET: Registered protocol family 1
NET: Registered protocol family 17
IP-Config: Complete:
device=eth0, addr=128
相关文档:
例一:发送Signaling Packet:
Signaling Command是2个Bluetooth实体之间的L2CAP层命令传输。所以得Signaling Command使用CID 0x0001.
多个Command可以在一个C-frame(control frame)中发送。
如果要直接发送Signaling Command.需要建立SOCK_RAW类型的L2CAP连接Socket。这样才有机会自己填充Command Code,Identi ......
你想成知道如何成为一个Linux内核开发者么?或者你的老板告诉你,“去为这个设备写一个Linux驱动。“这篇文档的目的,就是通过描述你需要经历的过程和提示你如何和社区一起工作,来教给你为达到这些目的所需要知道的所有知识。本文也尝试解释社区为什么这样工作的一些原因。
内核几乎全是用C写成的,有 ......
#include <stdio.h>
#include <unistd.h>
#define FOO "foo"
int main(void)
{
if(!access(FOO, F_OK))
{
if(!unlink(FOO))
{
}
else
{
printf("remove %s failed\n", FOO);
}
}
else
{
printf("%s not existed\ ......
一、要求:
1、能够显示出Makefile的总数
2、能显示一级目录下的Makefile总数、Makefile列表及其Makefile的内容
3、能将上述内容写入相应的文件
二、实例
rm -rf ~/Desktop/linux_Makefile/*
for i in `find . -maxdepth 1 -type d`
#仅仅是当前目录,所以请将本脚本放在linux源码目录下执行。
do
e ......