Busybox and benchmark configuration

Busybox and benchmarkconfiguration

配置linux内核

(Initrd) support (在block device中),另外最好将ext3文件系统编译进内核

 

配置busybox(使用1.18.3)

General Configuration

       >Show verbose applet usage messages

       >Runtime SUID/SGID configuration via/etc/busybox.conf

Build Opions

       >Build Busybox as a static binary

InstallationOptions

       >Don’t use /usr

(工具的选择先跳过)

 

编译busybox

#make

#make install

 

制作Initrd(cpio格式)

1)     拷贝busybox

#mkdir ramdisk

#cd ramdisk

#mkdir etc usr vartmp proc home root dev

#cp –R../busybox-1.18.3/_install/* .

 

2)     设备文件

#cp –R/dev/console dev

#cp –R /dev/nulldev

#cp –R /dev/zerodev

#cp –R /dev/ptsdev

#cp –R /dev/ptmxdev

 

3)     配置文件

#cp –R../busybox-1.18.3/examples/bootfloppy/etc/* etc/

#cp /etc/passwdetc/

#cp /etc/shadowetc/

默认的root使用/bin/bash登陆,但是busybox没有bash,修改etc/passwd:

Root:x:0:0:root:/root:/bin/ash

使用ash登陆root

 

4)     生成initrd

#chown root.rootbin/busybox

#chmod 4755bin/busybox

#shgen_initramfs_list.sh ramdisk/ > filelist

#gen_init_cpiofilelist > rootfs.cpio

#gzip rootfs.cpio

rootfs.cpio.gz就是一个可以使用的ramdisk

 

FTP配置

1)     在配置busybox是选上

Networking Utilities->

        >Ftpd

        >inetd

2)     在/etc/inetd.conf中追加:

21 stream tcpnowait root ftpd ftpd –w /tftp_ftp_dir

其中/tftp_ftp_dir是FTP的根目录

3)     在/etc/init.d/rcS中追加:

Inetd

 

Telnet配置

1)     Linuxkernel必须配置

CONFIG_UNIX98_PTYS=y

Networking Utilitiesà

选择[*] Support standalone telnetd (not inetdonly)

Login/Password ManagementUtilities

去掉[] Support for /etc/nologin

去掉[] Support for /etc/seruretty

 

2)     有/dev/pts, /dev/ptmx文件

3)     Busybox必须配置

CONFIG_LOGIN

CONFIG_FEATURE_SUID

4)     修改/etc/init.d/rcS文件

Mount –t devpts devpts /dev/pts

telnet –l /bin/login

 

 

移植Netserve(netperf服务端)

1)     找出netserver以及其依赖库的位置

#whereis netserver

Netserver:/usr/local/bin/netserver

#ldd/usr/local/bin/netserver

2)     将netserver以及依赖库拷贝到指定位置

3)     修改/etc/init.d/rcS, 添加:

/usr/local/bin/netserver

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值