Busybox and benchmark configuration

來源:互聯網
上載者:User

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

 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.