ºìÁªLinuxÃÅ»§
Linux°ïÖú

ÔÚLinuxÖÐʹÓà Stow ¹ÜÀíÈí¼þ°ü

·¢²¼Ê±¼ä:2006-03-13 00:34:16À´Ô´:ºìÁª×÷Õß:CMK
¡¡¡¡±¾ÎÄÊǹØÓÚ Stow µÄ£¬ËüÊÇÓÃÓÚ Linux µÄÈí¼þ°²×°¹ÜÀíʵÓóÌÐò£¬ËüÐí¶àµØ·½¶¼ÓÅÓÚ¡°¾Ã¾­¿¼Ñ顱µÄ Red Hat ºÍ Debian Èí¼þ°ü¹ÜÀíϵͳ¡£Í¨¹ýʹÓà Stow£¬¿ÉÒÔ½«Ó¦ÓóÌÐò´ò°ü³É±ê×¼µÄ tar Îļþ£¬²¢°´ÕÕÂß¼­°²ÅÅÓ¦ÓóÌÐò¶þ½øÖÆÎļþ£¬ÒÔÒ×ÓÚ·ÃÎÊ¡£
Stow ÊÇÓà Perl ±àдµÄ£¬Ò×ÓÚ°²×°ºÍʹÓã¬ËüËäÈ»¼òµ¥£¬µ«¶ÔÓÚÔÚ Linux »úÆ÷ÉÏ×éÖ¯ºÍ¹ÜÀí¸÷ÖÖÈí¼þ°²×°È´ºÜÓÐЧ¡£Stow ¿ÉÒÔ·½±ãµØ½«²»Í¬Èí¼þ°ü°²ÅÅÔÚ×éÖ¯Á¼ºÃµÄĿ¼Ê÷½á¹¹ÖС£Õâ²»½öÓÐÖúÓÚ½«ÊôÓÚÌØÊâÈí¼þ°üµÄÎļþÓëÆäËüÎļþ·Ö¿ª£¬¶øÇÒ»¹¸øÓèÓû§ÔÚÈκÎÆÚÍûµÄλÖô洢»ò°²×°Èí¼þ°üµÄ×ÔÓÉ£¬Í¬Ê±Ê¹Èí¼þ¿´ÉÏÈ¥±»°²×°ÔÚÈí¼þ°ü»ò OS ÒªÇóµÄλÖÃÉÏ¡£
×¢£ºÈç¹û¾ßÓÐ Linux µÄÖм¶ÖªÊ¶²¢°²×°¹ý Linux Ó¦ÓóÌÐò£¬ÔòÓÐÖúÓÚÀí½â±¾ÎÄ¡£ÔÚ±¾ÎÄÖУ¬ÎÒÃÇʹÓà Stow V1.3.3 ºÍ Perl V5.005¡£
Linux µÄÈí¼þ°²×°¹ÜÀí
ÔÚÎÒÃÇ¿ªÊ¼Á˽â Stow ֮ǰ£¬ÏÈÈÃÎÒÃÇÑо¿Ò»ÏÂÈí¼þ°²×°¹ÜÀí£¬ËüÒ²³Æ×÷Èí¼þ°ü¹ÜÀí¡£Èí¼þ°²×°¹ÜÀíÔÚ×ÜÌåÉÏÃèÊöÁËÔÚϵͳÉÏ°²×°¡¢Ð¶ÔØ¡¢¸üкÍ×éÖ¯Èí¼þÓ¦ÓóÌÐò£¨»ò³ÆΪÈí¼þ°ü£©µÄ»î¶¯¡£ÔÚÕâЩ»î¶¯ÖУ¬×éÖ¯Ó¦ÓóÌÐòÊÇÓÈÆäÖØÒªµÄ»î¶¯¡£Èç¹ûÓ¦ÓóÌÐò×éÖ¯µÃ¾®¾®ÓÐÌõ£¬ÄÇôÔÚ Linux »úÆ÷ÉÏ°²×°¡¢Éý¼¶ºÍжÔØÓ¦ÓóÌÐò»á±äµÃ¸ü¼ÓÈÝÒ×ÇÒ¸ü·½±ã¡£
ÔÚ Linux ϵͳÉÏ£¬´ó¶àÊýÓ¦ÓóÌÐò±ØÐë°²×°ÔÚijһÌض¨Ä¿Â¼£¨Í¨³£ÊÇ /usr/local/£©ÖвÅÄÜÕýÈ·ÔËÐкÍÆð×÷Óã»ÕâÖÖÐèÇóÀ´×Ô Linux »òÓ¦ÓóÌÐò±¾Éí¡£Èç¹ûÖ»ÔÚ Linux ϵͳÉÏ°²×°Á˺ÜÉÙµÄÓ¦ÓóÌÐò²¢ÇÒËüÃǸ÷×ÔµÄÎļþ¶¼¿ÉÒÔºÜÈÝÒ׵ر˴ËÇø·Ö£¬ÄÇôÕâ²»»áÔì³ÉÈκÎÑÏÖØÎÊÌâ¡£
È»¶ø£¬ÔÚʵ¼Ê·½°¸ÖУ¬¿ÉÄÜÓдóÁ¿Ó¦ÓóÌÐò°²×°ÔÚͬһĿ¼ÖУ¬¸ÃĿ¼²»¾Ã¾Í»á±äµÃºÜÔÓÂÒ¡£ÉèÏëһϣ¬ÔÚ°²×°Ò»¸öÓ¦ÓóÌÐòʱ£¬ËüÒâÍâµØ¸²¸ÇÁËÊôÓÚÁíÒ»¸öÓ¦ÓóÌÐòµÄÎļþ£¬ÄÇôÄú²»µÃ²»Ìæ»»¸ÃÎļþ¡£»òÕßÉèÏëһϣ¬ÔÚжÔغÍɾ³ýÓ¦ÓóÌÐò֮ǰ£¬É跨ȷ¶¨ÄÄЩÎļþÊôÓÚ¸ÃÓ¦ÓóÌÐò¡£»òÕߣ¬Äú¿ÉÄÜÏ£ÍûÕÒµ½²¢É¾³ýÓ¦ÓóÌÐò²»ÐèÒªµÄÎļþ¡£ËùÓÐÕâЩÇéÐζ¼»á»¨·ÑÐí¶à¾«Á¦ºÍʱ¼ä£¬²¢ÇÒÒªÇóÀμÇÎļþÃû¡£
ΪÁË¿Ë·þÕâÑùµÄÎÊÌ⣬ËùÒÔ½«Èí¼þ°²×°¹ÜÀíʵÓóÌÐòÓÃÓÚ Linux ϵͳ¡£ËüÃDz»½öÓÐÖúÓÚ×éÖ¯ºÍ°²ÅŶà¸öÈí¼þ°²×°£¬¶øÇÒ»¹¿ÉÒÔ¸ù¾ÝÐèÒª£¬ÈÎÒâ´ÎÊýµØ¸ü¸ÄÕâÑùµÄ°²ÅÅ£¬¶øÇÒ²»·Ñ´µ»ÒÖ®Á¦¡£Stow ¾ÍÊÇÕâÑùÒ»ÖÖÓÃÓÚ Linux µÄʵÓóÌÐò¡£
½éÉÜ Stow
ËäȻһЩ Linux ·Ö·¢°æ£¨Èç Red Hat ºÍ Debian£©ÌṩÁËËüÃÇ×Ô¼ºµÄÈí¼þ°ü¹ÜÀíʵÓóÌÐò£¨·Ö±ðÊÇ rpm ºÍ apt-get£©£¬ÕâЩʵÓóÌÐòÓë Stow Ò»ÑùÓÐЧ£¬µ«ËüÃǽöÓÃÓÚÌض¨µÄ´ò°ü¸ñʽ£¨·Ö±ðÊÇ .rpm ºÍ .deb£©¡£µ±¹ÜÀíÖ»´ò°ü³É .tar ÎļþµÄÓ¦ÓóÌÐòʱ£¬Stow ÊÇ×î¼ÑÑ¡Ôñ¡£
ÁíÍ⣬Èç¹ûÈËÃdzýÁËʹÓà Red Hat ºÍ Debian Ö®Í⣬»¹ÒªÊ¹ÓÃÆäËü Linux ·Ö·¢°æ£¬»òÕßÏ£ÍûΪÏÖÓеÄÈí¼þ°ü¹ÜÀíʵÓóÌÐòÕÒµ½±ãÒË»òÃâ·ÑµÄ±¸Ó÷½°¸£¬ÔÙ»òÕßÖ»Ïë×Ô¼º¿ØÖÆÿ¼þÊÂÇ飬ÄÇô Stow ÊÇÒ»¸öºÃµÄÑ¡Ôñ¡£Stow ÊÇ×ñÑ­ GNU GPL£¨Í¨Óù«¹²Ðí¿ÉÖ¤£¬General Public License£©µÄÃâ·ÑÈí¼þ£¬ËüÁé»î²¢ÇÒ¿ÉÒÔÓóä×ãµÄÓû§Ö§³ÖºÍ¿ÉÓÃ×ÊÔ´½øÐж¨ÖÆ¡£
Stow ͨ¹ý½«Ó¦ÓóÌÐòµÄ°²×°Îļþ´æ´¢²¢×éÖ¯µ½Æä×Ô¼ºµÄµ¥¶ÀĿ¼£¨³ÆΪÈí¼þ°üĿ¼£©£¬´Ó¶øʹËüÃDZ˴˷ֿª£¬À´¹ÜÀí²»Í¬Ó¦ÓóÌÐò¡£ÕâЩÈí¼þ°üĿ¼פÁôÔÚÒ»¸ö stow Ŀ¼ÖУ¬¸ÃĿ¼°üº¬ËùÓÐÒÑ×°ÔصÄÓ¦ÓóÌÐòµÄÈí¼þ°üĿ¼£¬ÊÇÕâЩĿ¼µÄ¸¸Ä¿Â¼¡£
Stow ÔÊÐíÓû§×ÔÓɵؽ«Ó¦ÓóÌÐò¼°ÆäÏà¹ØÎļþ°²×°ºÍ´æ´¢ÔÚÈκÎÆÚÍûλÖõÄÈí¼þ°üĿ¼ÖУ¨Í¨¹ý½«¸ÃλÖÃÖ¸¶¨Îª×°ÔØĿ¼£©£¬¶ø²»ÊDZ¾µØ°²×°µÄÓ¦ÓóÌÐòµÄ¹«¹²Î»Öã¨/usr/local/ Ŀ¼£©»òÓÉÓ¦ÓóÌÐò±¾ÉíÖ¸¶¨µÄȱʡλÖ᣸÷½·¨ÓÐÖúÓÚʹ /usr/local/ Ŀ¼±£³ÖÕû½à£¬¶øÓ¦ÓóÌÐò±»°²ÅÅÔÚ¾®È»ÓÐÐòµÄĿ¼Ê÷½á¹¹ÖУ¬Ò×ÓÚ²éÕÒ¡£
×¢£ºÈ±Ê¡ stow Ŀ¼ÊÇ Stow ×Ô¼ºµÄĿ¼£¬Î»ÓÚ /usr/local/bin ÖУ»ÔÚ°²×° Stow ʱ¿ÉÒÔ¸ü¸ÄËü£¨Çë²ÎÔÄ°²×° Stow£©¡£
Stow ²»½ö¿ÉÒÔ½«Ó¦ÓóÌÐò×éÖ¯ÔÚ stow Ŀ¼Ê÷ÖУ¬¶øÇÒ»¹¿ÉÒÔÔÚȱʡλÖã¨Ó¦ÓóÌÐò×î³õ±»ÒªÇó°²×°µÄλÖã©´´½¨ÏàÓ¦µÄ·ûºÅÁ´½Ó£¨symlink£©¡£ÔÚ Stow ÊõÓïÖУ¬¸ÃȱʡλÖóÆΪĿ±êĿ¼¡£È±Ê¡Çé¿öÏ£¬Ä¿±êĿ¼ÊÇ stow Ŀ¼µÄ¸¸Ä¿Â¼¡£¾¡¹Ü¶ÔÓÚËùÓÐÓà stow ´¦ÀíµÄÓ¦ÓóÌÐò¶øÑÔ£¬Óà /usr/local/stow ×÷Ϊ stow Ŀ¼²¢ÇÒÓà /usr/local ×÷ΪĿ±êĿ¼ÊÇÏ°¹ß×÷·¨£¬µ«Óû§¿ÉÒÔ×ÔÓɵØΪ Stow ºÍÄ¿±êĿ¼ָ¶¨ÆäËüλÖã¨Çë²ÎÔÄ stow ÃüÁ¡£stow Ŀ¼ÖеÄÓ¦ÓóÌÐòĿ¼Ê÷Ó¦¸ÃÓëÄ¿±êĿ¼ÖÐËùÆÚÍûµÄÊ÷Ò»Ñù¡£
Ó¦ÓóÌÐòÏàÓ¦µÄ·ûºÅÁ´½Ó£¨Î»ÓÚÓ¦ÓóÌÐòÄ¿±êĿ¼ÖУ©Ö¸Ïò stow Ŀ¼ÖÐÓ¦ÓóÌÐòµÄʵ¼ÊλÖã¨ÆäÈí¼þ°üĿ¼£©¡£·ûºÅÁ´½ÓÓеãÀàËÆÓÚ Windows ¿ì½Ý·½Ê½»ò MacOS ±ðÃû£¬Ëü¿ÉÒÔ±íʾפÁôÔÚÁíÒ»¸öλÖ㨻òÐíÊDz»Í¬µÄÇý¶¯Æ÷»òĿ¼£©µÄÓ¦ÓóÌÐòµÄÓ³Ïó¡£È»ºó£¬Ê¹ÓÃÕâЩ·ûºÅÁ´½ÓÀ´µ÷ÓûòÔËÐиÃÓ¦ÓóÌÐò¡£ÕâÈÃÈ˾õµÃÓ¦ÓóÌÐò±¾Éí±»°²×°ÔÚÄ¿±êĿ¼Öв¢ÇÒÊÇ´Ó¸ÃĿ¼ÖÐÔËÐеġ£µ±ÆäËüÓ¦ÓóÌÐòÐèÒªµ÷ÓÃÕýÔÚÌÖÂÛµÄÓ¦ÓóÌÐò»òÒªÓëÖ®½øÐн»»¥£¬²¢ÆÚÍûËüפÁôÔÚÆäȱʡλÖÃʱ£¬¸Ã·½·¨ºÜÓÐÓá£
×¢£º
Stow ´´½¨Ïà¶Ô·ûºÅÁ´½Ó£»¼´·ûºÅÁ´½ÓÖ¸Ã÷ÁËÖÁÈí¼þ°üĿ¼µÄÏà¶Ô·¾¶£¨Ïà¶ÔÓÚ·ûºÅÁ´½Ó×Ô¼ºµÄλÖã©¡£
Stow É跨Ϊÿ¸öÓ¦ÓóÌÐò´´½¨×îСÊýÄ¿µÄ·ûºÅÁ´½Ó -- Èç¹û¿ÉÄÜ£¬½öΪÈí¼þ°üĿ¼ÖеÄÕû¸ö×ÓĿ¼Ê÷´´½¨Ò»¸ö·ûºÅÁ´½Ó¡£´´½¨ÕâÖÖµ¥Ò»·ûºÅÁ´½ÓµÄ¹ý³Ì³ÆΪÊ÷ÕÛµþ¡£
Stow »¹¿ÉÓÃÓÚÖ´ÐÐͬһӦÓóÌÐòµÄ¶à´Î°²×°¡£²»Í¬µÄ°²×°¿ÉÒÔפÁôÔÚ²»Í¬µÄλÖÃÉÏ£¬²¢ÇÒ Stow ¿ÉÓÃÓÚ´´½¨ºÍ¸üÐÂÒ»×éÓ¦ÓóÌÐò·ûºÅÁ´½Ó£¬Ê¹Ö®Ö¸ÏòÈκÎÆÚÍûµÄλÖá£
Stow ²»½ö¿ÉÒÔ×éÖ¯Èí¼þ°²×°£¬¶øÇÒ»¹¿ÉÒÔ¸ù¾ÝÐèÒªÈÎÒâ´ÎÊýµØ¸ü¸ÄÈκÎÒÔÇ°µÄÈí¼þ°²×°²¼¾Ö¡£Stow ½«¾ö²»»áɾ³ý stow Ŀ¼ÖеÄÈκÎÎļþ»òĿ¼£¬¼´Ê¹ÔÚжÔØÆÚ¼äÒ²ÊÇÈç´Ë¡£ËüÖ»¸üлò³ýȥĿ±êÊ÷ÖÐÖ¸ÏòÓ¦ÓóÌÐò°²×°µÄ·ûºÅÁ´½Ó£¬ËùÒÔÒªÔٴΰ²×°ÒÑжÔصÄÓ¦ÓóÌÐò£¬Ö»ÒªÖØÐÂ×°ÔØËü¾ÍÐÐÁË¡£
°²×°ºÍÔËÐÐ Stow
ÐèÇó
°²×° Stow ȷʵ·Ç³£¼òµ¥¡£°²×°ºÍÔËÐÐ Stow µÄΨһÐèÇóÊÇ Stow ±¾ÉíºÍ Perl V5.005 »ò¸ü¸ß°æ±¾¡£
¿ÉÒÔ´Ó GNU FTP Õ¾µã£¨Çë²ÎÔIJο¼×ÊÁÏÒÔ»ñÈ¡Á´½Ó£©ÏÂÔØ Stow µÄ×îа汾¡£±¾ÎÄʹÓà V1.3.3£¬ÔÚ±àд±¾ÎÄʱ£¬¸Ã°æ±¾ÊÇ×îеġ£
Perl ÊÇËùÓÐÖ÷Òª Linux ·Ö·¢°æ±ê×¼°²×°µÄÒ»²¿·Ö¡£Òª²é¿´ÄúËùÓµÓеİ汾£¬Ê¹ÓÃÃüÁî perl -v¡£¿ÉÒÔ´Ó perl.com£¨Çë²ÎÔIJο¼×ÊÁÏÒÔ»ñÈ¡Á´½Ó£©»ñµÃÓÐ¹Ø Perl ¼°Æä×îа汾µÄ¸ü¶àÐÅÏ¢¡£
°²×° Stow
Òª°²×° Stow£¬ÔÚ Linux ϵͳÉϱØÐëÒÔ root Óû§Éí·ÝµÇ¼¡£ÏÂÔØ Stow Ô´Îļþ£¨stow-1.3.3.tar.gz£©Ö®ºó£¬ÏÂÁÐÃüÁ½â°ü£¨untar£©²¢°²×° Stow¡£
Çåµ¥ 1. °²×° Stow
# tar -zxvf stow-1.3.3.tar.gz
# cd stow-1.3.3
#./configure
# make
# make install prefix=/usr/local/stow
Stow °²×°µÄȱʡλÖÃÊÇ /user/local/bin Ŀ¼¡£Í¨¹ý½«ËùÆÚÍûµÄλÖã¨×÷Ϊһ¸ö¾ø¶ÔĿ¼·¾¶£©Ö¸¶¨ÎªÉÏÃæÇåµ¥ÖÐ make install ÃüÁîµÄ prefix Ñ¡ÏîµÄÖµ£¬¾Í¿ÉÒÔ¸ü¸ÄÕâ¸öλÖá£
Stow ÏÖÔÚ±»°²×°ÔÚλÓÚ /usr/local/stow ÏÂ×Ô¼ºµÄĿ¼Ê÷ÖС£Ò²¾ÍÊÇ˵£¬Stow ¿ÉÖ´ÐÐÎļþÏÖÔÚפÁôÔÚ /usr/local/stow/bin Ŀ¼ÖУ¬Stow man ÎļþפÁôÔÚ /usr/local/stow/man Ŀ¼ÖУ¬¶ø info ÎļþפÁôÔÚ /usr/local/stow/info Ŀ¼ÖС£ÏÖÔÚ£¬Stow ÒѾ­×¼±¸ºÃ×°ÔØÓ¦ÓóÌÐò¡£
×¢£º
ÔÚ½â°ü Stow Ô´ÎļþÖ®ºó£¬²úÉúµÄ stow-1.3.3 Îļþ¼Ð°üº¬Ò»¸öÃûΪ INSTALL µÄÎļþ£¬¸ÃÎļþ°üº¬ÓÐÓõݲװָʾÐÅÏ¢¡£

ÔÚ°²×° Stow Ö®ºó£¬½«ÖÁ stow Ŀ¼µÄ¾ø¶Ô·¾¶Ìí¼Óµ½ $PATH ±äÁ¿ÖС£
stow ÃüÁî
Stow ÌṩÁËÒ»¸öÌØÊâÃüÁî stow£¬¸ÃÃüÁî¿ÉÒÔÓë¸÷ÖÖÑ¡ÏîÒ»ÆðÖ´ÐУ¬ÒÔµ÷Óà Stow ½øÐÐÈí¼þ°²×°¹ÜÀí¡£Stow ÃüÁîµÄ³£¹æÓï·¨ÈçÏ£º
$ stow [options] application-name
ÏÂÃæÃèÊöÁ˸÷ÖÖ stow Ñ¡Ï
-v »ò --verbose[=n]£ºÏÔʾÃèÊö Stow ÕýÔÚ×öʲôµÄÏêϸÊä³ö¡£n ±íʾÏêϸ¼¶±ð£¬¿ÉÒÔÊÇ 0¡¢1¡¢2 »ò 3£»È±Ê¡ÖµÊÇ 0¡£Ê¹Óà -v »ò --verbose ½«Ïêϸ¼¶±ðÔö¼Ó 1£»Ê¹Óà --verbose=n ½«ËüÉèÖÃΪ n¡£
-d directory »ò --dir=directory£º½« stow Ŀ¼ÉèÖÃ³É directory£¨µ½ÆÚÍûĿ¼µÄ¾ø¶Ô·¾¶£©¶ø²»Êǵ±Ç°Ä¿Â¼¡£ÕâÒ²¿ÉÒÔʹĿ¼µÄ¸¸Ä¿Â¼³ÉΪȱʡĿ±êĿ¼¡£
-t directory »ò --target=directory£º½«Ä¿±êĿ¼ÉèÖÃ³É directory£¨ÖÁÆÚÍûĿ¼µÄ¾ø¶Ô·¾¶£©¶ø²»Êǵ±Ç° stow Ŀ¼µÄ¸¸Ä¿Â¼¡£
-D »ò --delete£º´ÓÄ¿±êĿ¼ɾ³ýÓ¦ÓóÌÐòµÄ·ûºÅÁ´½Ó£¬Ò²¾ÍÊÇж¿Õ£¨unstow£©Ó¦ÓóÌÐò¡£
-R »ò --restow£ºÖØÐÂ×°ÔØÓ¦ÓóÌÐò£¨ÏÈж¿Õ£¬È»ºóÔÙ×°ÔØ£©¡£Í¨¹ý¸ü¸Ä·ûºÅÁ´½ÓµÄÈí¼þ°üĿ¼£¬ÔÚ¸üÐÂÓ¦ÓóÌÐòÖ®ºó£¬¸ÃÑ¡Ïî¶Ô¸üзûºÅÁ´½Ó²¢´ÓÄ¿±êÊ÷³ýÈ¥¾ÉµÄ·ûºÅÁ´½ÓºÜÓÐÓá£
-c »ò --conflicts£ºËÑË÷¿ÉÄÜÓÉʵ¼Ê stow ²Ù×÷ÒýÆðµÄËùÓгåÍ»¡£¸ÃÑ¡ÏîÓëÁíÒ»¸öÑ¡Ïî -n£¨Çë¼ûÏÂÃæµÄÑ¡ÏһÆðʹÓᣵ«¿ÉÄܻᱨ¸æ¼Ù³åÍ»£¨Çë²ÎÔIJο¼×ÊÁÏ£¬ÒÔ»ñÈ¡ Stow ÊÖ²áÖÐÓйسåͻһ½ÚµÄÁ´½Ó£©¡£
-n »ò --no£º²»Ö´ÐÐÈκΠstow ²Ù×÷£¬Ö»ÏÔʾ½«·¢Éúʲô¡£ÓÉÓÚ²»Ö´ÐÐʵ¼Ê²Ù×÷£¬ËùÒÔ stow -n »á±¨¸æ²»´æÔڵijåÍ»£¨Çë²ÎÔIJο¼×ÊÁÏ£¬ÒÔ»ñÈ¡ Stow ÊÖ²áÖÐÓйسåͻһ½ÚµÄÁ´½Ó£©ºÍ±Ø¶¨»á·¢ÉúµÄʵ¼Ê³åÍ»¡£
-V »ò --version£ºÏÔʾ Stow °æ±¾ºÅ¡£
-h »ò --help£ºÏÔʾ Stow ÃüÁîÓï·¨¡£
ʹÓà Stow µÄʾÀý
ΪÁËѧϰÈçºÎʹÓà Stow£¬ÈÃÎÒÃÇ×°ÔØÒ»¸öÐé¹¹µÄÓ¦ÓóÌÐò app-1.4¡£ÈÃÎÒÃǼÙÉèÓ¦ÓóÌÐòÔ´ÎļþÊÇ app-1.4.tar.gz£¬Ëü±ØÐè°²×°ÔÚ /usr/local/bin ÖС£Òª°²×°¸ÃÓ¦ÓóÌÐò£¬ÎÒÃDZØÐèÒÔ root Óû§Éí·ÝµÇ¼¡£
Ê×ÏÈ£¬ÎÒÃÇÐèÒª½«Óà tar ѹËõ¹ýµÄÔ´Îļþ½âѹµ½£¨±È·½Ëµ£©ÃûΪ source µÄĿ¼ÖУº
[root@linuxbox source]# tar -zxvf app-1.4.tar.gz
Õ⽫ÔÚĿ¼ source Öд´½¨°üº¬ app-1.4 Ô´ÎļþµÄĿ¼ app-1.4¡£ÏÖÔÚ£¬ÎÒÃǸü¸Äµ½ app-1.4 Ŀ¼£º
[root@linuxbox source]# cd app-1.4
Ê×ÏÈ£¬ÎÒÃÇÐèÒª½«Ó¦ÓóÌÐò°²×°µ½ stow Ŀ¼Ï¡£ÈÃÎÒÃǼÙÉèÆäλÖÃÊÇ /usr/local/stow¡£ÎÒÃǽ«¶Ô¸Ã°²×°Ö´ÐÐÆÕͨµÄ configure¡¢make ºÍ make install ¹ý³Ì£¬ÈçÏÂËùʾ£º
[root@linuxbox app-1.4]# ./configure --prefix=/usr/local/stow/app-1.4 [root@linuxbox app-1.4]# make [root@linuxbox app-1.4]# make install
ÏÖÔÚ£¬ÎÒÃÇͨ³£Ê¹Óà Stow£¬À´×°ÔØÓ¦ÓóÌÐò°²×°²¢ÔÚÄ¿±êĿ¼ /usr/local/bin Öд´½¨ÏàÓ¦µÄ·ûºÅÁ´½Ó¡£ÎÒÃDz»±ØÒÔ root Óû§Éí·ÝµÇ¼À´Ö´ÐиÃÈÎÎñ¡£Ê×ÏÈ£¬ÈÃÎÒÃǸü¸ÄÖÁ stow Ŀ¼£¬È»ºó´ÓÄÇÀïÖ´ÐÐ stow ÃüÁî¡£
[userX@linuxbox app-1.4]$ cd /usr/local/stow/ [userX@linuxbox stow]$ stow -t /usr/local/bin app-1.4
ÏÖÔÚ£¬Ó¦ÓóÌÐò app-1.4 פÁôÔÚ stow Ŀ¼ÖÐÆä×Ô¼ºµÄÈí¼þ°üĿ¼ app-1.4 ÖУ¬ÆäÏàÓ¦µÄ·ûºÅÁ´½Ó±»·ÅÔÚÄ¿±êĿ¼ /usr/local/bin ÖС£
Èç¹ûÎÒÃÇÐèÒªÉý¼¶»òÖØÐÂÅäÖà app-1.4£¬Ö»Òª¸ü¸Äµ½ÆäÈí¼þ°üĿ¼£¬²¢ÇÒÔÚ¸üÐÂÓ¦ÓóÌÐòÖ®ºó£¬ÖØÐÂ×°ÔØËüÒÔ¸üÐÂÏàÓ¦µÄ·ûºÅÁ´½Ó£º
[userX@linuxbox stow]# stow -R app-1.4
ҪжÔظÃÓ¦ÓóÌÐò£¬Ö»Ðèж¿Õ app-1.4£º
[userX@linuxbox stow]# stow -D app-1.4
Stow ½«Ö»³ýÈ¥Ö¸ÏòÓ¦ÓóÌÐò°²×°µÄÁ´½Ó£¬¾ö²»»áɾ³ýÈκΰ²×°Îļþ¡£Òò´Ë£¬ÉÔºó¿ÉÒÔÔÙ´Î×°ÔØÓ¦ÓóÌÐòÒÔʹÓÃËü¡£
½áÊøÓï
Stow ÊÇÓÃÓÚ Linux ϵͳµÄÒ»ÖÖÃâ·Ñ¡¢¼òµ¥ÇÒÒ×ÓÚʹÓõÄÈí¼þ°²×°¹ÜÀíʵÓóÌÐò¡£¶ÔÓÚ´ÓÓ¦ÓóÌÐòµÄ tar Ô´ÎļþÖ±½Ó°²×°µÄÓ¦ÓóÌÐò¶øÑÔ£¬Stow ÊÇÊ®·ÖÀíÏëµÄ£¬¶øÏó .rpm »ò .deb ÕâÑùµÄ±ê×¼´ò°ü¸ñʽÔÚ´ËÇé¿öϲ¢²»Êʺϡ£Stow ͨ¹ý½«Ó¦ÓóÌÐò°²×°±£´æÔÚÈκÎÆÚÍûλÖÃÏÂÆä×Ô¼ºµÄµ¥¶ÀĿ¼ÖÐÀ´¹ÜÀíËüÃÇ£¬Í¬Ê±Ê¹ËüÃÇ¿´ÉÏÈ¥±»°²×°ÔÚ±ØÐèµÄλÖÃÉÏ¡£
ʹÓà Stow ½øÐÐÈí¼þ°²×°¹ÜÀíÌṩÁËÐí¶àÓŵ㣬ÈçÒ×ÓÚ°²×°ºÍжÔØÓ¦ÓóÌÐò¡¢Ò×ÓÚ¸ú×ÙÒÑ°²×°µÄÓ¦ÓóÌÐò¼°ÆäÏà¹ØÎļþ¡¢Ò×ÓÚÉý¼¶ºÍÒ×ÓÚÖØÐÂÅäÖÃÒÑ×°ÔصÄÓ¦ÓóÌÐò¡£
²Î¿¼×ÊÁÏ
Çë·ÃÎÊ Stow Ö÷Ò³£¬ÒÔ»ñÈ¡µ½ Stow µÄ GNU ÕýʽվµãÉÏÏà¹ØÐÅÏ¢µÄÁ´½Ó¡£
´Ó GNU FTP Õ¾µãÏÂÔØ Stow µÄ×îа汾¡£
Çë²Î¿¼ Stow ÊÖ²áÒ³Ã棬ÒÔ»ñÈ¡Ò»°ãÐÅÏ¢ÒÔ¼°ÓÐ¹Ø Stow ÈçºÎ´¦ÀíÃüÃû³åÍ»µÄÕ½ڡ£
ÇëÔÚ Linux Gazette ÉÏÔĶÁÓÉ Allan Peda ׫дµÄÓÐ¹Ø Stow µÄÓÐÓÃÎÄÕ¡°Simple Package Management With Stow¡±¡£
ÓÐ¹Ø Perl ÐÅÏ¢¼°Æä×îа汾µÄÏÂÔØ£¬Çë·ÃÎÊ perl.com¡£
ÓÐ¹Ø Red Hat µÄÈí¼þ°ü¹ÜÀíʵÓóÌÐò¸ÅÊö£¬ÇëÔĶÁÎÒÃǵÄÈý²¿·ÖϵÁÐÎÄÕ¡£µÚ 1 ²¿·Ö ÌÖÂÛÁËÈçºÎʹÓà RPM£¬µÚ 2 ²¿·ÖÌÖÂÛÁËÈí¼þ²¹¶¡ºÍ·Ö·¢ RPM£¬µÚ 3 ²¿·ÖÌÖÂÛÁËÔÚ°²×°ºÍжÔØÆÚ¼äÔËÐнű¾¡£
ÎÒÃÇÔÚÓйرàÒëÔ´ÎļþºÍ¹ÜÀíÈí¼þ°üµÄ½Ì³ÌÖÐÌÖÂÛÁË Red Hat ºÍ Debian Èí¼þ°ü¹ÜÀí¡£
Èç¹ûÐèÒªÔÚÕû¸öÆóÒµ·¶Î§ÄÚ¹ÜÀíÈí¼þ·Ö·¢°æ£¬ÄÇô Tivoli ¿ÉÒÔ°ïÖúÄú¡£Çë²é¿´ IBM.com É쵀 Tivoli Configuration Manager¡£
ÎÄÕÂÆÀÂÛ

¹²ÓÐ 0 ÌõÆÀÂÛ