Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB
ÈÈÃűêÇ©£º c c# c++ asp asp.net linux php jsp java vb Python Ruby mysql sql access Sqlite sqlserver delphi javascript Oracle ajax wap mssql html css flash flex dreamweaver xml
 ×îÐÂÎÄÕ : linux

Ô¶ÀëWindows,ʹÓÃLinux/Unix

2005Äê9ÔÂ22ÈÕ£¬Ç廪ÔÚ¶Á²©Ê¿ÉúÍõÛóÔÚˮľÉçÇøBLOGÉÏ·¢±íÁË¡¶Ç廪ÃεķÛËé--д¸øÇ廪´óѧµÄÍËѧÉêÇë¡·Ã÷È·ÒªÇóÍËѧ, ÒýÆðÉç»á¸÷½ç¹ã·ºÕùÂÛ. Ëû´´×÷µÄ³¤ÆªÎÄÕ¡¶ÍêÈ«ÓÃLinux¹¤×÷¡·, ÑóÑóÁ½Íò¶à×Ö, ´Ó²»Í¬½Ç¶È¾Ó¸ßÁÙϵIJûÊöÁËËûÑÛÖÐLinuxÍêÈ«ÓÅÔ½ÓÚWindowsµÄ¸÷ÖÖÀíÓÉ, ÕâÆªÎÄÕ²¢²»¼òµ¥µÄÊÇһƪÂÛÊö"WindowsÄÜ×öµÄÊÂLinux¶¼ÄÜ×ö"ÕâÑùµÄÎÄÕÂ, ͨƪÑóÒç×ÅÒ»¸ö³¹µ×ÅúÅÐ Windows ƽ̨»ù´¡µÄ¼ÆËã»úÕÜѧ, ¼ÆËã»úÓ¦ÓúͼÆËã»ú½ÌÓýÌåϵµÄÈ˵ÄÍòÕɺÀÇé, ¾¡¹Ü¿ÉÄÜÆ«¼¤, Ò²²»·¦ÏêϸµÄÍÆÀíÂÛÊö. ½ñÌìÎÒÃÇÖØÎ±¾ÎÄ, Ò»·½ÃæÒ²ÊÇÒòΪCBÉÏϲ°®ºÍÍÆ¹ãLinuxµÄÈËÊ¿ºÜ¶à, ÓÐʱҲ»á±¬·¢Ð¡¹æÄ£ÂÛÕ½, ÎÒÃÇÏ£ÍûÄÜͨ¹ý¶Ô±¾ÎĵÄÑо¿ÓëÌÖÂÛ, À´¿ú²â¹úÄÚ²¿·ÖLinuxÍÆ¹ãÕßµÄÐÄ̬, ͬʱΪ´ó¼ÒÌṩ¸ü¿í¹ãµÄÌÖÂÛ¿Õ¼ä.
ÎÒÒѾ­°ëÄêûÓÐʹÓà Windows µÄ·½Ê½¹¤×÷ÁË¡£Linux ¸ßЧµÄÍê³ÉÁËÎÒËùÓеŤ×÷¡£
GNU/Linux ²»ÊÇÿ¸öÈ˶¼ÏëÓõġ£Èç¹ûÄãÖ»ÐèÒª´¦ÀíÒ»°ãµÄÊÂÎñ£¬´òÓÎÏ·£¬ÄÇôÄã²»ÐèÒªÁ˽âÏÂÃæÕâЩÁË¡£
ÎÒ²»ÊÇÒ»¸ö¿ñÈȵÄ×ÔÓÉÈí¼þ·Ý×Ó£¬ËäÈ»ÎÒºÜϲ»¶×ÔÓÉÈí¼þ¡£ÕâÆªÎÄÕÂÒ²²»ÊÇÓÃÀ´ÍÆÐÐ×ÔÓÉÈí¼þÔ˶¯µÄ£¬ËäÈ»ÎÒ¾õµÃ×ÔÓÉÈí¼þÔ˶¯ÊǷdz£ºÃµÄ¡£
ÕâÆªÎÄÕÂÒ²²»ÊÇÓÃÀ´±È½Ï Linux ºÍ Windows ÄÚºËЧÂÊ£¬Îļþϵͳ£¬ÍøÂç·þÎñµ ......

Linux Kernel API (2.6)

#protect share data
spin_lock/spin_unlock: protect the data during process context(and only at process context), and make sure your code bewteen lock/unlock is fast enough.There may deadlock if the same spin_lock is called at interrupt context.
spin_lock_irq/spin_unlock_irq: call it during interrupt context, make sure the irq is on before calling this function, it will disable irq before accessing share data
spin_lock_irqsave/irqrestore: use at interrupt context, and will save/restort irq registers
The code between spin_lock**/spin_unlock** must not sleep.
The spin_lock** API is defined at include/linux/spinlock_api_up.h for UP architecture.
linux/kernel/spinlock.c is only for SMP.
mutex_lock/mutex_unlock: the similar with down/up, but more efficient
mutex_lock_interruptible: the simlilar with down_interruptiable, can be interruptiable by signal.(like CTRL-C)
the code beween mutex_lock and mutex_unlock can go to sleep ......

Ubuntu Linuxϵͳ»·¾³±äÁ¿ÅäÖÃÎļþ½éÉÜ


Ubuntu Linuxϵͳ»·¾³±äÁ¿ÅäÖÃÎļþ½éÉÜ
 
·¢²¼Ê±¼ä£º2007.12.19 06:30     À´Ô´£ºÈüµÏÍø    ×÷Õߣºsixth
ÔÚUbuntuÖÐÓÐÈçϼ¸¸öÎļþ¿ÉÒÔÉèÖû·¾³±äÁ¿
 
/etc/profile:ÔڵǼʱ,²Ù×÷ϵͳ¶¨ÖÆÓû§»·¾³Ê±Ê¹ÓõĵÚÒ»¸öÎļþ,´ËÎļþΪϵͳµÄÿ¸öÓû§ÉèÖû·¾³ÐÅÏ¢,µ±Óû§µÚÒ»´ÎµÇ¼ʱ,¸ÃÎļþ±»Ö´ÐС£
 
/etc/environment:ÔڵǼʱ²Ù×÷ϵͳʹÓõĵڶþ¸öÎļþ,ϵͳÔÚ¶ÁÈ¡Äã×Ô¼ºµÄprofileǰ,ÉèÖû·¾³ÎļþµÄ»·¾³±äÁ¿¡£
 
~/.profile:ÔڵǼʱÓõ½µÄµÚÈý¸öÎļþÊÇ.profileÎļþ,ÿ¸öÓû§¶¼¿ÉʹÓøÃÎļþÊäÈëרÓÃÓÚ×Ô¼ºÊ¹ÓõÄshellÐÅÏ¢,µ±Óû§µÇ¼ʱ,¸ÃÎļþ½ö½öÖ´ÐÐÒ»´Î!ĬÈÏÇé¿öÏÂ,ËûÉèÖÃһЩ»·¾³±äÁ¿,Ö´ÐÐÓû§µÄ.bashrcÎļþ¡£
 
/etc/bashrc:Ϊÿһ¸öÔËÐÐbash shellµÄÓû§Ö´ÐдËÎļþ.µ±bash shell±»´ò¿ªÊ±,¸ÃÎļþ±»¶ÁÈ¡.
 
~/.bashrc:¸ÃÎļþ°üº¬×¨ÓÃÓÚÄãµÄbash shellµÄbashÐÅÏ¢,µ±µÇ¼ʱÒÔ¼°Ã¿´Î´ò¿ªÐµÄshellʱ,¸Ã¸ÃÎļþ±»¶ÁÈ¡¡£
......

Linux»·¾³½ø³Ì¼äͨÐÅ


Linux»·¾³½ø³Ì¼äͨÐÅ£¨Ò»£©
¹ÜµÀ¼°ÓÐÃû¹ÜµÀ
Ö£ÑåÐË (mlinux@163.com)¹ú·À¿Æ´ó¼ÆËã»úѧԺ
2002 Äê 12 ÔÂ 11 ÈÕ
ÔÚ±¾ÏµÁÐÐòÖÐ×÷Õ߸ÅÊöÁË linux ½ø³Ì¼äͨÐŵļ¸ÖÖÖ÷ÒªÊֶΡ£ÆäÖйܵÀºÍÓÐÃû¹ÜµÀÊÇ×îÔçµÄ½ø³Ì¼äͨÐÅ»úÖÆÖ®Ò»£¬¹ÜµÀ¿ÉÓÃÓÚ¾ßÓÐÇ×Ôµ¹ØÏµ½ø³Ì¼äµÄͨÐÅ£¬ÓÐÃû¹ÜµÀ¿Ë·þÁ˹ܵÀûÓÐÃû×ÖµÄÏÞÖÆ£¬Òò´Ë£¬³ý¾ßÓйܵÀËù¾ßÓеŦÄÜÍ⣬Ëü»¹ÔÊÐíÎÞÇ×Ôµ¹ØÏµ½ø³Ì¼äµÄͨÐÅ¡£ ÈÏÇå¹ÜµÀºÍÓÐÃû¹ÜµÀµÄ¶Áд¹æÔòÊÇÔÚ³ÌÐòÖÐÓ¦ÓÃËüÃǵĹؼü£¬±¾ÎÄÔÚÏêϸÌÖÂÛÁ˹ܵÀºÍÓÐÃû¹ÜµÀµÄͨÐÅ»úÖÆµÄ»ù´¡ÉÏ£¬ÓÃʵÀý¶ÔÆä¶Áд¹æÔò½øÐÐÁ˳ÌÐòÑéÖ¤£¬ÕâÑù×öÓÐÀûÓÚÔöÇ¿¶ÁÕß¶Ô¶Áд¹æÔòµÄ¸ÐÐÔÈÏʶ£¬Í¬Ê±Ò²ÌṩÁËÓ¦Ó÷¶Àý¡£
1¡¢ ¹ÜµÀ¸ÅÊö¼°Ïà¹ØAPIÓ¦ÓÃ
1.1 ¹ÜµÀÏà¹ØµÄ¹Ø¼ü¸ÅÄî
¹ÜµÀÊÇLinuxÖ§³ÖµÄ×î³õUnix IPCÐÎʽ֮һ£¬¾ßÓÐÒÔÏÂÌØµã£º
¹ÜµÀÊǰëË«¹¤µÄ£¬Êý¾ÝÖ»ÄÜÏòÒ»¸ö·½ÏòÁ÷¶¯£»ÐèҪ˫·½Í¨ÐÅʱ£¬ÐèÒª½¨Á¢ÆðÁ½¸ö¹ÜµÀ£»
Ö»ÄÜÓÃÓÚ¸¸×Ó½ø³Ì»òÕßÐֵܽø³ÌÖ®¼ä£¨¾ßÓÐÇ×Ôµ¹ØÏµµÄ½ø³Ì£©£»
µ¥¶À¹¹³ÉÒ»ÖÖ¶ÀÁ¢µÄÎļþϵͳ£º¹ÜµÀ¶ÔÓڹܵÀÁ½¶ËµÄ½ø³Ì¶øÑÔ£¬¾ÍÊÇÒ»¸öÎļþ£¬µ«Ëü²»ÊÇÆÕͨµÄÎļþ£¬Ëü²»ÊôÓÚijÖÖÎļþϵͳ£¬¶øÊÇ×ÔÁ¢ÃÅ»§£¬µ¥¶À¹¹³ÉÒ»ÖÖÎļþϵͳ£¬²¢ÇÒÖ»´æÔÚÓëÄÚ´æÖС£
Êý¾ÝµÄ¶Á³öºÍдÈ룺һ¸ö½ø³ÌÏò¹ÜµÀÖÐ ......

LinuxµÄ¹¤×÷¶ÓÁÐ

1£¬ÏÈ¿´¿´¹¤×÷¶ÓÁкÍtaskletµÄÇø±ð£º
    £¨1£© ¶¨Ê±Æ÷ºÍtasklet£º
    Tasklets resemble kernel timers in 3 ways.
      1)They are always run at interrupt time,
      2)they always run on the same CPU that schedules them,
      3)and they receive an unsigned long argument.   Unlike kernel timers, however, you can’t ask to execute the function at a specific time.
     £¨2£© taskletºÍ¹¤×÷¶ÓÁУº
     Workqueues are, superficially, similar to tasklets; they allow kernel code to request that a function be called at some future time. There are, however, some significant differences between the two, including:
        1) Tasklets run in software interrupt context with the result that all tasklet code must be atomic. Instead, workqueue functions run in the context of a special ker ......

LinuxÏÂNginx + Resin µÄ´î½¨

nginxµÄ°²×°
¶ÔÓÚÏÖÔÚÁ÷ÐеÄNginx + Resin£¬ÆäÐÔÄÜ´ó¼Ò¶¼ÓÐÄ¿¹²¶Ã¡£
Ê×ÏÈ£¬°²×°Nginx
¿ÉÒÔ²ÎÊýNginxµÄ°²×°ÎÄÕ£ºhttp://blog.csdn.net/vebasan/archive/2010/02/26/5328494.aspx
Èç¹ûÔÚ°²×°NginxµÄʱºòÌáʾÓÐÎÊÌ⣬¿ÉÒԲο¼£ºhttp://blog.csdn.net/vebasan/archive/2010/02/26/5328545.aspx
ÓйØNginx£¬pcre£¬opensslÏà¹ØµÄ°üÎļþ£¬¿ÉÒÔͨ¹ýgoogle½øÐвéÕÒÏÂÔØ£¬²¢ÉÏ´«µ½·þÎñÆ÷ÉÏ¡£
½Ó×Å£¬°²×°Resin
tar -xvf resin-3.1.9.tar.gz
½Ó×Å£¬½«ÆäÒÆ¶¯µ½/usr/local/resinÏÂÃæ
mv resin-3.1.9 /usr/local/resin
½Ó׎øÈëresinµÄĿ¼£¬¶ÔÆä½øÐÐÅäÖð²×°
cd /usr/local/resin
./configure
make
make install
½Ó×Å£¬ÎÒÃÇÐèÒª½«nginxÅäÖÃΪϵͳµÄ·þÎñ
vi /etc/rc.d/init.d/nginx
ÔÚvi»·¾³Ï£¬ÌùÏÂÒÔÏÂÄÚÈÝ£º
 ³ÌÐò´úÂë
#!/bin/bash
# nginx Startup script for the Nginx HTTP Server
# this script create it by gcec at 2009.10.22.
# it is v.0.0.1 version.
# if you find any errors on this scripts,please contact gcec cyz.
# and send mail to support at gcec dot cc.
#
# chkconfig: - 85 15
# description: Nginx is a high-performance we ......
×ܼǼÊý:5772; ×ÜÒ³Êý:962; ÿҳ6 Ìõ; Ê×Ò³ ÉÏÒ»Ò³ [390] [391] [392] [393] 394 [395] [396] [397] [398] [399]  ÏÂÒ»Ò³ βҳ
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ