Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

LinuxÏÂÓÃBusy BoxÖÆ×÷RamdiskÈ«¹ý³Ì

  -------------------------------------------------------------------------------------------------------
//By:yuyongbao
//QQ:673360056
LinuxÏÂÓÃBusy BoxÖÆ×÷RamdiskÈ«¹ý³Ì
1 ½¨Á¢¸ùÎļþϵͳ½á¹¹
#mkdir rootfs
#cd rootfs
#mkdir bin dev etc lib proc sbin tmp usr var
#chmod 1777 tmp
#mkdir usr/bin usr/lib usr/sbin
#mkdir var/lib var/lock var/log var/run var/tmp
#chmod 1777 var/tmp
2 ×¼±¸Á´½Ó¿â
#cd ${OBJ_LIB}/lib (${OBJ_LIB}Êǽ»²æ±àÒë»·¾³µÄĿ¼)
#for file in libc libcrypt libdl libm \
>libpthread libresolv libutil
>do
>cp $file-*.so /home/fortis/rootfs/lib
>cp -d $file.so.[*0-9] /home/fortis/rootfs/lib
>done
#cp -d ld*.so* /home/fortis/rootfs/lib
3 ʹÓÃbusyboxÖÆ×÷ϵͳӦÓóÌÐò
3.1 ÏÂÔØbusybox£¨http://www.busybox.net/£©²¢½âѹ¡£
3.2 ½øÈë½âѹºóµÄĿ¼£¬ÅäÖÃBusybox
$make menuconfig
Busybox Settings >
General Configuration >
[*] Support for devfs
Build Options >
[*] Build BusyBox as a static binary (no shared libs)
/* ½«busybox±àÒëΪ¾²Ì¬Á¬½Ó£¬ÉÙÁËÆô¶¯Ê±ÕÒ¶¯Ì¬¿âµÄÂé·³ */
[*] Do you want to build BusyBox with a Cross Compiler?
(/usr/local/arm/3.3.2/bin/armlinux)
Cross Compiler prefix/* Ö¸¶¨½»²æ±àÒ빤¾ß·¾¶ */
Init Utilities >
[*] init
[*] Support reading an inittab file
/* Ö§³Öinit¶ÁÈ¡/etc/inittabÅäÖÃÎļþ£¬Ò»¶¨ÒªÑ¡ÉÏ */
Shells >
Choose your default shell (ash) >
/* (X) ash Ñ¡ÖÐash£¬ÕâÑùÉú³ÉµÄʱºò²Å»áÉú³Ébin/shÎļþ
* ¿´¿´ÎÒÃÇÇ°Í·µÄlinuxrc½Å±¾µÄÍ·Ò»¾ä£º
* #!/bin/sh ÊÇÓÉbin/shÀ´½âÊÍÖ´ÐеÄ
*/
[*] ash
Coreutils >
[*] cp
[*] cat
[*] ls
[*] mkdir
[*] echo (basic SuSv3 version taking no options)
[*] env
[*] mv
[*] pwd
[*] rm
[*] touch
Editors >
[*] vi
Linux System Utilities >
[*] mount
[*] umount
[*] Support loopback mounts
[*] Support for the old /etc/mtab file
Networking Utilities >
[*] inetd
/*
* Ö§³Öinetd³¬¼¶·þÎñÆ÷
*/
3.3 ±àÒë²¢°²×°Busybox
$make TARGET_ARCH=arm CROSS=armlinux\
PREFIX=/home/arm/dev_home/


Ïà¹ØÎĵµ£º

linux ϵͳµ÷ÓÃÁÐ±í£¨×ª£©

ת×Ô£º
http://www.ibm.com/developerworks/cn/linux/kernel/syscall/part1/appendix.html
±¾ÎÄÁгöÁ˴󲿷ֳ£¼ûµÄLinuxϵͳµ÷Ó㬲¢¸½ÓмòÒªÖÐÎÄ˵Ã÷¡£
ÒÔÏÂÊÇLinuxϵͳµ÷ÓõÄÒ»¸öÁÐ±í£¬°üº¬Á˴󲿷ֳ£ÓÃϵͳµ÷ÓúÍÓÉϵͳµ÷ÓÃÅÉÉú³öµÄµÄº¯Êý¡£Õâ¿ÉÄÜÊÇÄãÔÚ»¥ÁªÍøÉÏËùÄÜ¿´µ½µÄΨһһƪÖÐÎÄ×¢Ê͵ÄLinuxϵͳµ÷ÓÃÁÐ±í£¬¼´Ê¹ ......

¼õÉÙLinuxÏÂSquid·þÎñÆ÷µÄTIME_WAITÌ×½Ó×ÖÊýÁ¿

Linuxϸ߲¢·¢µÄSquid·þÎñÆ÷£¬TCP TIME_WAITÌ×½Ó×ÖÊýÁ¿¾­³£´ïµ½Á½¡¢ÈýÍò£¬·þÎñÆ÷ºÜÈÝÒ×±»ÍÏËÀ¡£Í¨¹ýÐÞ¸ÄLinuxÄں˲ÎÊý£¬¿ÉÒÔ¼õÉÙSquid·þÎñÆ÷µÄTIME_WAITÌ×½Ó×ÖÊýÁ¿¡£
¡¡¡¡
vi /etc/sysctl.conf
¡¡¡¡Ôö¼ÓÒÔϼ¸ÐУº
ÒýÓÃ
net.ipv4.tcp_fin_timeout = 30
net.ipv4.tcp_keepalive_time = 1200
net.ipv4.tcp_syncookie ......

ʹÓÃGnu gprof½øÐÐLinuxƽ̨ϵijÌÐò·ÖÎö

O.S ʹÓÃGnu gprof½øÐÐLinuxƽ̨ϵijÌÐò·ÖÎö
¹Ø ¼ü ´Ê£ºgprof callgraph º¯ÊýÏûºÄµÄʱ¼ä LinuxÓ¦Ó÷ÖÎö
ÔĶÁÌáʾ£º±¾ÎĽéÉÜÁËÈçºÎʹÓÃGnu gprof ¶ÔLinuxƽ̨ϵÄÏÖÓгÌÐò½øÐÐÓÅ»¯·ÖÎöºÍÉú³É³ÌÐòµ÷ÓÃͼ¡£Ö÷ҪƫÖØÓÚ¶ÔÉú³ÉºÍʹÓÃÁ÷³Ìͼ×÷½éÉÜ¡£
Gprof ¼ò½é:
    Gprof¹¦ÄÜ£º´òÓ¡³ö³ÌÐòÔËÐÐÖи÷¸öº¯ÊýÏûºÄ ......

Linux——samba·þÎñÅäÖÃÏê½â

1 ²é¿´µ±Ç°°²×°sambaûÓУ¬
ÃüÁrpm -qa | grep samba
ÓÐ3¸öÎļþÈ磺samba¡¢common¡¢clientÔò±íÃ÷³É¹¦°²×°ÁË
·ñÔò£ºÓÃÃüÁîrpm -ivh samba*.rpm°²×°sambaÈí¼þ°ü¡£
2 °²×°Íêºó¶àÊý¶¼±£´æÔÚ/etc/sambaĿ¼Ï£¬Ä¿Â¼ÏÂÓÐÒ»¸ösmb.confµÄÎļþ£¬
ËüÊÇsamba·þÎñµÄºËÐÄÎļþ£¬ËùÓÐÅäÖö¼ÔÚÕâÀïÐ޸ġ£
ÆäÖаüÀ¨smbdºÍnmbdÁ½¸ö³ ......

Linux±ØѧµÄ60¸öÃüÁî

LinuxÌṩÁË´óÁ¿µÄÃüÁÀûÓÃËü¿ÉÒÔÓÐЧµØÍê³É´óÁ¿µÄ¹¤
×÷£¬Èç´ÅÅ̲Ù×÷¡¢Îļþ´æÈ¡¡¢Ä¿Â¼²Ù×÷¡¢½ø³Ì¹ÜÀí¡¢ÎļþȨÏÞÉ趨µÈ¡£ËùÒÔ£¬ÔÚLinuxϵͳÉϹ¤×÷Àë²»¿ªÊ¹ÓÃϵͳÌṩµÄÃüÁî¡£ÒªÏëÕæÕýÀí½âLinuxϵͳ£¬
¾Í±ØÐë´ÓLinuxÃüÁîѧÆð£¬Í¨¹ý»ù´¡µÄÃüÁîѧϰ¿ÉÒÔ½øÒ»²½Àí½âLinuxϵͳ¡£
²»Í¬Linux·¢ÐаæµÄÃüÁîÊýÁ¿²»Ò»Ñù£¬µ«Linux·¢Ð ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ