基于linux的家用网关

基于linux的家用网关

ID:32573091

大小:83.50 KB

页数:7页

时间:2019-02-12

基于linux的家用网关_第1页
基于linux的家用网关_第2页
基于linux的家用网关_第3页
基于linux的家用网关_第4页
基于linux的家用网关_第5页
资源描述:

《基于linux的家用网关》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库

1、基于linux的家用网关准备工作:1.linux-2.6.9.tar.gz-----linux内核源代码2.busybox-1.10.1.tar.gz-----busybox是很多标准Linux®工具的一个单个可执行实现。3.实验环境虚拟机实验步骤:一、制作RAM盘映像文件(/root)1.创建空白文件系统ddif=/dev/zeroof=initrdbs=16Mcount=12.格式化空白文件系统mke2fs-F-m0initrd3.挂载mount-text2-oloopinitrd/mnt/initrd4.创建必要的目录(/mnt/initrd)脚本:insta

2、ll-d{bin,dev,etc,lib,mnt}install-d{sbin,usr,var,sys,proc}install-droot-m0750install-dtmp/var/tmp-m1777install-dusr/{bin,lib,sbin,share}install-dusr/share/terminfoinstall-dvar/{lock,log,run,lib,local,tmp}5.创建初始设备节点(/mnt/initrd/dev)脚本:mknod-m622consolec51mknod-m660nullc13chownroot:root*c

3、hmod+xMAKEDEV./MAKEDEV6.复制所需要的动态连接库(/mnt/initrd/lib/)cp-rdf/lib/libc-*.*.*.so./cp-rdf/lib/libc.so.6./cp-rdf/lib/ld-*.*.*.so./cp-rdf/lib/ld-linux.so.2./cp-rdf/lib/libcrypt-*.*.*.so./cp-rdf/lib/libcrypt.so.1./cp-rdf/lib/libnss_*./cp-rdf/lib/libresolv*./cp-rdf/lib/libdl*./cp-rdf/lib/libns

4、l*./cp/lib/libm.so.6./cp/lib/libselinux.so.1./cp–R/lib/tls/./cp-R/lib/iptables/./检查:(查看一是否有红名的文件)7.创建配置文件(当前目录/mnt/initrd/etc)fstab[root@localhostetc]#catfstab/dev/ram/rootfsdefaults11Proc/procprocdefaults00inittab[root@localhostetc]#chmod+xinittab[root@localhostetc]#catinittabconsole:

5、:sysinit:-/etc/rcStty0::askfirst:-/bin/login#ttyS0::respanwn:-/bin/ash::respawn:/sbin/getty-LttyS09600vt100::ctrlaltdel:/sbin/reboot::shutdown:/bin/umount-a-r::shutdown:/sbin/swapoff-arcS[root@localhostetc]#chmod+xrcS[root@localhostetc]#catrcShostnameGWmount-tproc/proc/procmount-tsysfs

6、/sys/sysmount-tdevptsdevpts/dev/ptsmount-ttmpfs/dev/shm/dev/shmudevd--daemonudevstart/sbin/klogd/sbin/syslogd/sbin/runcfgtelnetd-p10023nsswitch.conf[root@localhostetc]#catnsswitch.confpasswd:filesgroup:filesshadow:fileshosts:filesdnsnetworks:filesdnsprotocols:filesservices:filesethers:

7、filesrpc:filesnetgroup:filespasswd[root@localhostetc]#catpasswdroot:x:0:0:root:/:/bin/ashnobody:x:99:99:Nobody:/:/sbin/nologingroup[root@localhostetc]#catgrouproot:x:0:rootnobody:x:99:shadow[root@localhostetc]#catshadowroot:$1$FIC8K/qi$enuz4oqXR2FkjRgpcmU76.:13870:0:99999:7:::其他配置文件直

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。