易截截图软件、单文件、免安装、纯绿色、仅160KB

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


相关文档:

Linux内存管理之slab分配器分析(续五)

 九:几点补充:
1: Slab中使用的页面都会加上“PG_slab”标志,以跟一般的页面区别。另外,在释放内存的时候,经常需要用到从页面到slab的对应转换关系。那是怎样标识的呢?
关于标志:
注意有以下代码:
static void *kmem_getpages(kmem_cache_t *cachep, int flags, int nodeid)
{
  &n ......

linux Socket编程入门

以前已经接触Windows下的Socket编程,最近也尝试着再linux下使用Socket编程,下面是在网上找的例子(已经测试过)
 tcp_server.c:
#include <stdio.h>
#include <sys/socket.h>
#include <unistd.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <stdlib.h>
# ......

极小的Linux发行版

 




<!--
@page { margin: 2cm }
P { margin-bottom: 0.21cm }
A:link { so-language: zxx }
-->

       一个
Linux
发行版,体积很小,用处反而很大。此话当真?
 
       一般而言,老式计算机内存都不大, ......

Linux 系统时间设置、编程总结

未完待续...
设置时间:
date -s "2009/11/08 11:23:00"
硬件时钟与系统时间同步一下:
hwclock --systohc
编程:
#include <cstdlib>
time_t time(time_t *timer)
调用后将当前系统时间与1900年1月1日相差的秒数存入到timer中,timer可看成是一个长整型数
具体描述:
  函数原型:  ......

Linux driver编写思考


<!--
/* Font Definitions */
@font-face
{font-family:宋体;
panose-1:2 1 6 0 3 1 1 1 1 1;
mso-font-alt:SimSun;
mso-font-charset:134;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:3 135135232 16 0 262145 0;}
@font-face
{font-family:"\@宋体" ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号