linux½ø³Ìºǫ́ÔËÐеļ¸ÖÖ·½·¨
ÎÒÃǾ³£»áÅöµ½ÕâÑùµÄÎÊÌ⣬Óà telnet/ssh µÇ¼ÁËÔ¶³ÌµÄ Linux ·þÎñÆ÷£¬ÔËÐÐÁËһЩºÄʱ½Ï³¤µÄÈÎÎñ£¬ ½á¹ûÈ´ÓÉÓÚÍøÂçµÄ²»Îȶ¨µ¼ÖÂÈÎÎñÖÐ;ʧ°Ü¡£ÈçºÎÈÃÃüÁîÌá½»ºó²»Êܱ¾µØ¹Ø±ÕÖն˴°¿Ú/ÍøÂç¶Ï¿ªÁ¬½ÓµÄ¸ÉÈÅÄØ£¿ÏÂÃæ¾ÙÁËһЩÀý×Ó£¬ Äú¿ÉÒÔÕë¶Ô²»Í¬µÄ³¡¾°Ñ¡Ôñ²»Í¬µÄ·½Ê½À´´¦ÀíÕâ¸öÎÊÌâ¡£
nohup/setsid/&
³¡¾°£º
Èç¹ûÖ»ÊÇÁÙʱÓÐÒ»¸öÃüÁîÐèÒª³¤Ê±¼äÔËÐУ¬Ê²Ã´·½·¨ÄÜ×î¼ò±ãµÄ±£Ö¤ËüÔÚºǫ́Îȶ¨ÔËÐÐÄØ£¿
hangup Ãû³ÆµÄÀ´ÓÉ
ÔÚ Unix µÄÔçÆÚ°æ±¾ÖУ¬Ã¿¸öÖն˶¼»áͨ¹ý modem ºÍϵͳͨѶ¡£µ±Óû§ logout ʱ£¬modem ¾Í»á¹Ò¶Ï£¨hang up£©µç»°¡£ ͬÀí£¬µ± modem ¶Ï¿ªÁ¬½Óʱ£¬¾Í»á¸øÖն˷¢ËÍ hangup ÐźÅÀ´Í¨ÖªÆä¹Ø±ÕËùÓÐ×Ó½ø³Ì¡£
½â¾ö·½·¨£º
ÎÒÃÇÖªµÀ£¬µ±Óû§×¢Ïú£¨logout£©»òÕßÍøÂç¶Ï¿ªÊ±£¬Öն˻áÊÕµ½ HUP£¨hangup£©ÐźŴӶø¹Ø±ÕÆäËùÓÐ×Ó½ø³Ì¡£Òò´Ë£¬ÎÒÃǵĽâ¾ö°ì·¨¾ÍÓÐÁ½ÖÖ;¾¶£ºÒªÃ´Èýø³ÌºöÂÔ HUP Ðźţ¬ÒªÃ´Èýø³ÌÔËÐÐÔÚеĻỰÀï´Ó¶ø³ÉΪ²»ÊôÓÚ´ËÖն˵Ä×Ó½ø³Ì¡£
1. nohup
nohup ÎÞÒÉÊÇÎÒÃÇÊ×ÏÈÏëµ½µÄ°ì·¨¡£¹ËÃû˼Ò壬nohup µÄÓÃ;¾ÍÊÇÈÃÌá½»µÄÃüÁîºöÂÔ hangup Ðźš£ÈÃÎÒÃÇÏÈÀ´¿´Ò»Ï nohup µÄ°ïÖúÐÅÏ¢£º
NOHUP(1) User Commands NOHUP(1)
NAME
nohup - run a command immune to hangups, with output to a non-tty
SYNOPSIS
nohup COMMAND [ARG]...
nohup OPTION
DESCRIPTION
Run COMMAND, ignoring hangup signals.
--help display this help and exit
--version
output version information and exit
¿É¼û£¬nohup µÄʹÓÃÊÇÊ®·Ö·½±ãµÄ£¬Ö»ÐèÔÚÒª´¦ÀíµÄÃüÁîÇ°¼ÓÉÏ nohup ¼´¿É£¬±ê×¼Êä³öºÍ±ê×¼´íÎóȱʡ»á±»Öض¨Ïòµ½ nohup.out ÎļþÖС£Ò»°ãÎÒÃÇ¿ÉÔÚ½áβ¼ÓÉÏ"&"À´½«ÃüÁîͬʱ·ÅÈëºǫ́ÔËÐУ¬Ò²¿ÉÓÃ">filename 2>&1"À´¸ü¸ÄȱʡµÄÖض¨ÏòÎļþÃû¡£
nohup ʾÀý
[root@pvcent107 ~]# nohup ping www.ibm.com &
[1] 3059
nohup: appending output to `nohup.out'
[root@pvcent107 ~]# ps -ef |grep 3059
root 3059 984 0 21:06 pts/3 00:00:00 ping www.ibm.com
root 3067 984 0 21:06 pts/3 00:00:00 grep 3059
[root@pvcent107 ~]#
2¡£setsid
nohup ÎÞÒÉÄÜͨ¹ýºöÂÔ HUP ÐźÅÀ´Ê¹ÎÒÃǵĽø³Ì±ÜÃâÖÐ;±»Öжϣ¬µ«Èç¹ûÎÒÃÇ»»¸ö½Ç¶È˼¿¼£¬Èç¹ûÎÒÃǵĽø³Ì²»ÊôÓÚ½ÓÊÜ HUP ÐźŵÄÖն˵Ä×
Ïà¹ØÎĵµ£º
from: http://cc.byexamples.com/20070520/tap-the-interrupt-signal/
When you hit control+c, you are actually send a SIGINT ( Interrupt signal ) to your program. By default, your program will be terminated after receiving SIGINT. But you can change the way of handling Interrupt signal.
Some of the a ......
ÏÂÔØÐÂÄÚºËÒÔºó£¬ÏÈ°ÑLinux-2.6.18.2.tar.bz2 ¸´ÖƵ½/usr/src/ µÄÏÂÃæ
tar –jxvf Linux-2.6.18.2.tar.bz2 cd Linux-2.6.18.2 make mrproper °ÑÔÀ´±àÒë²úÉúµÄÀ¬»øɾ³ý
ÅäÖÃÄں˿ÉÒÔ¸ù¾ÝÐèÒªÓë°®ºÃʹÓÃÏÂÃæÃüÁîÖеÄÒ»¸ö£º
££make config £¨»ùÓÚÎı¾µÄ×îΪ´«Í³µÄÅäÖýçÃ棩
££make menuconfig £¨»ùÓÚÎı¾ ......
sarÊÇÒ»¸öÓÅÐãµÄÒ»°ãÐÔÄܼàÊÓ¹¤¾ß£¬Ëü¿ÉÒÔÊä³öLinuxËùÍê³ÉµÄ¼¸ºõËùÓй¤×÷µÄÊý¾Ý¡£sarÃüÁîÔÚsysetat rpmÖÐÌṩ¡£Ê¾ÀýÖÐʹÓÃsysstat°æ±¾5.0.5£¬ÕâÊÇÎȶ¨µÄ×îа汾֮һ¡£¹ØÓÚ°æ±¾ºÍÏÂÔØÐÅÏ¢£¬Çë·ÃÎÊsysstatÖ÷Ò³http://perso.wanadoo.fr/sebastien.godard/¡£
sar¿ÉÒÔÏÔʾCPU¡¢ÔËÐжÓÁС¢´ÅÅÌI/O¡¢·ÖÒ³£¨½»»»Çø£©¡¢ÄÚ´æ¡¢CPUÖÐ ......
£¨1£©Ê×ÏÈÊǶÔLinuxÆô¶¯¹ý³ÌµÄ¸ú×ٺͷÖÎö£¬Éú³ÉÏêϸµÄÆô¶¯Ê±¼ä±¨¸æ¡£
¡¡¡¡½ÏΪ¼òµ¥¿ÉÐеķ½Ê½ÊÇͨ¹ýPrintkTime¹¦ÄÜΪÆô¶¯¹ý³ÌµÄËùÓÐÄÚºËÐÅÏ¢Ôö¼Óʱ¼ä´Á£¬±ãÓÚ»ã×Ü·ÖÎö¡£PrintkTime×îÔçΪCELFËùÌṩµÄÒ»¸öÄں˲¹¶¡£¬ÔÚºóÀ´µÄKernel 2.6.11°æ±¾ÖÐÕýʽÄÉÈë±ê×¼Äںˡ£ËùÒÔ´ó¼Ò¿ÉÄÜÔÚа汾µÄÄÚºËÖÐÖ±½ÓÆôÓøù¦ÄÜ¡£Èç¹ûÄãµÄLin ......
http://hi.baidu.com/vsgp/blog/item/0daae64589a3852fcffca3e7.html
1¡¢°²×°vsftpd
ÖÕ¶ËÊäÈ룺sudo apt-get install vsftpd
°²×°ÁËÖ®ºó»áÔÚ/home/Ͻ¨Á¢Ò»¸öftpĿ¼¡£ÕâʱºòÄã¿ÉÒÔÊÔ×Å·ÃÎÊÏÂftp://IPµØÖ·¡£Ó¦¸Ã¿ÉÒÔ¿´µ½Ò»¸ö¿Õ°×ÄÚÈݵÄftp¿Õ¼ä¡£
ÆôÓãºsudo /etc/init.d/vsftpd start
Í£Óãºsudo /etc/init.d/ ......