¡¡¡¡ ÎÒÃÇÔÚÔĶÁlinuxÔ´´úÂëʱ¶¼ÓÐÕâÑùµÄÌå»á:ºËÐĵÄ×éÖ¯Ïà¶ÔËÉÉ¢£¬ÔÚ¿´Ò»¸öÎļþʱÍùÍùҪǣÉæµ½ÆäËûµÄÍ·Îļþ¡¢Ô´´úÂëÎļþ¡£Èç´ËÀ´»ØÌøתѰÕÒ±äÁ¿¡¢³£Á¿¡¢º¯ÊýµÄ¶¨ÒåÊ®·Ö²»·½±ã£¬ÕâÑùÕÛÌÚ¼¸´Î£¬±ãʹ¶Á´úÂëµÄÐÄÇé½µµ½Á˵͵㡣
¡¡¡¡ lxr(linux cross reference)¾ÍÊÇÒ»¸ö½â¾öÕâ¸öÎÊÌâµÄ¹¤¾ß£ºËû¶ÔÖ¸¶¨µÄÔ´´úÂëÎļþ½¨Á¢Ë÷ÒýÊý¾Ý¿â£¬ÀûÓÃperl½Å±¾CGI¶¯Ì¬Éú³É°üº¬ÂëµÄwebÒ³Ã棬Äã¿ÉÒÔÓÃÈκÎÒ»ÖÖä¯ÀÀÆ÷²éÔÄ¡£ÔÚ´ËwebÒ³ÖУ¬ËùÓбäÁ¿¡¢³£Á¿¡¢º¯Êý¶¼ÒÔ³¬Á¬½ÓµÄÐÎʽ¸ø³ö£¬Ê®·Ö·½±ã²éÔÄ¡£±ÈÈçÄãÔĶÁ/usr/src/linux/net/socket.cµÄÔ´´úÂ룬·¢ÏÖº¯Êý get_empty_inode²»ÖªµÀÊÇÈçºÎÒÔ¼°ÔÚÄÄÀﶨÒåµÄ£¬ÕâʱºòÄãÖ»Òªµã»÷ get_empty_inode,lxr½«·µ»Ø´Ëº¯ÊýµÄ¶¨Ò塢ʵÏÖÒÔ¼°¸÷´ÎÒýÓÃÊÇÔÚʲôÎļþµÄÄÄÒ»ÐУ¬×¢Ò⣬ÕâЩÐÅÏ¢Ò²Êdz¬Á¬½Ó£¬µã»÷½«Ö±½ÓÌøתµ½ÏàÓ¦µÄÎļþÏàÓ¦µÄÐС£ÁíÍâlxr»¹Ìṩ±êʶ·ûËÑË÷¡¢ÎļþËÑË÷£¬½áºÏ³ÌÐò glimpse»¹¿ÉÒÔÌṩ¶ÔËùÓеÄÔ´ÂëÎļþ½øÐÐÈ«ÎļìË÷£¬ÉõÖÁ°üÀ¨×¢ÊÍ£¡
¡¡¡¡ ÏÂÃ潫½áºÏʵÀý½éÉÜÒ»ÏÂlxrºÍglimpseµÄ»ù±¾°²×°ºÍʹÓã¬ÓÉÓÚglimpse±È½Ï¼òµ¥£¬¾Í´ÓËü¿ªÊ¼£º
¡¡¡¡ Ê×ÏÈ·ÃÎÊÕ¾µã£º http://glimpse.cs.arizona.edu/ µÃµ½glimpseµÄÔ´Âë,±ÈÈçÎҵõ½µÄÊÇglimpse-4.12.5.tar.gz . ÓÃrootµÇ¼£¬ÔÚÈÎһĿ¼ÏÂÓÃtar zxvf glimpse-4.12.5.tar.gz½â¿ªÑ¹Ëõ°ü£¬ÔÚµ±Ç°Ä¿Â¼Ï³öÏÖÐÂĿ¼glimpse-4.12.5 .½øÈë¸ÃĿ¼£¬Ö´ÐÐmake¼´¿É¡£½øÈëbinĿ¼£¬½«ÎļþglimpseºÍglimpseindex¿½±´µ½/bin»ò/usr/binÏÂ
¼´¿É¡£Èç¹ûµ¥¶ÀʹÓÃglimpse£¬ÄÇôֻҪ¼òµ¥µÄÖ´ÐÐglimpseindex foo¼´¿É£¬ÆäÖÐfooÊÇÄãÏëÒªË÷ÒýµÄĿ¼£¬±ÈÈç˵ÊÇ/usr/src/linux .glimpseindexµÄÖ´Ðнá¹ûÊÇÔÚÄãµÄÆðʼĿ¼Ï²úÉúÈô¸É.glimpse*µÄË÷ÒýÎļþ¡£È»ºóÄãÖ»ÒªÖ´ÐÐglimpse yourstring¼´¿É²éÕÒ/usr/src/linuxÏÂËùÓаüº¬×Ö·û´®yourstringµÄÎļþ¡£
¡¡¡¡ ¶ÔÓÚlxr£¬Äã¿ÉÒÔ·ÃÎÊ http://lxr.linux.no/µÃµ½ËüµÄÔ´´úÂë¡£½â°üºó£¬×ñÑÈçϲ½Ö裺
¡¡¡¡ /*ÏÂÃæµÄÎÄ×ÖÀ´Ô´ÓÚlxrµÄ°ïÖúÎĵµÒÔ¼°±¾È˵ݲװÌå»á*/
¡¡¡¡ 1)ÐÞ¸ÄMakefileÖеıäÁ¿PERLBINºÍINSTALLPREFIX,ʹËüÃÇ·Ö±ðΪ
perl³ÌÐòµÄλÖúÍÄãÏëlxr°²×°µÄλÖÃ.ÔÚÎҵĻúÆ÷ÉÏ£¬PERLBINµÄֵΪ/usr/bin/perl.ÖÁÓÚINSTALLPREFIX£¬ÓÐÈçÏÂÔÔò£¬lxrµÄ°²×°Â·¾¶±ØÐëÊÇweb·þÎñÆ÷ÄÜÓÐȨÏÞ·ÃÎÊ¡£Òò´ËËüµÄÖµ¼òµ¥Ò»µã¿ÉÈ¡/home/httpd/html/lxr (¶ÔÓÚApache web server)¡£
¡¡¡¡ 2)Ö´ÐÐ make install
¡¡¡¡ 3)ÐÞ¸Ä$INSTALLPREFIX/http/lxr.conf :
baseurl : http://yourIP/lxr/http/
htmlhead: /home/httpd/html/lxr/http/template-head
htmltail: /home/httpd/html/lxr/http/template-tail
htmldir: /home/httpd/html/lxr/http/template-dir
sourceroot : /usr/src/linux # ¼ÙÈç¶ÔlinuxºËÐÄ´úÂëË÷Òý
dbdir : /home/httpd/html/lxr/dbdir/ #dbdirk¿ÉÈÎÒâÆðÃû£¬ÇÒλÖÃÈÎÒâ
glimpsebin: /usr/bin/glimpse #¿ÉÖ´ÐгÌÐòglimpseµÄλÖÃ
¡¡¡¡ 4)ÔÚ$INSTALLPREFIX/http/ÏÂÔö¼ÓÒ»¸öÎļþ.htaccess ÄÚÈÝ£º
¡¶Files ~ (source|search|ident|diff|find)$¡·***
SetHandler cgi-s cript
¡¶/Files¡·
ÉÏÃæÕâ¸öÎļþ±£Ö¤Apache server½«¼¸¸öperlÎļþ×÷Ϊcgi-s cript.
¡¡¡¡ 5)°´ÕÕlxr.confÖеÄÉèÖý¨Á¢dbdir ,°´ÕÕÉÏÀý,½¨Á¢Ä¿Â¼
/home/httpd/html/lxr/dbdir
½øÈëÕâ¸öĿ¼ִÐÐ$INSTALLPREFIX/bin/genxref yourdir
ÆäÖÐyourdirÊÇÔ´ÂëĿ¼£¬±ÈÈç/usr/src/linux
Èç¹ûÒª½áºÏglimpse£¬ÔòÖ´ÐÐglimpseindex -H . yourdir
¡¡¡¡ 6)ÐÞ¸Ä /etc/httpd/conf/access.conf ,¼ÓÈë
¡¶Directory /home/httpd/html/lxr/http¡·
Options All
AllowOverride All
order allow,deny
allow from all
¡¶/Directory¡·
¡¡¡¡ 7)½øÈë/etc/rc.d/init.d/ Ö´ÐÐ
killall httpd
./httpd start
½øÈëX £¬ÓÃä¯ÀÀÆ÷ http://yourIP/lxr/http/blurb.html´ó¹¦¸æ³É £¬ÕâÏÂÄã¿ÉÒÔÊæÐĵĶÁÔ´ÂëÁË¡£
¡¡¡¡ ×¢Ò⣺ÒÔÉÏÖ»ÊÇlxrºÍglimpseµÄ»ù±¾Ó÷¨£¬½øÒ»²½µÄ˵Ã÷¿ÉÒԲο¼Á¬»úÎĵµ¡£ÈçÓÐÎÊÌâÇëÓë sea_cloud@263.net ÁªÏµ¡£
***ÎÄÖеġ°¡¶¡±¡°¡·¡±£¬Êµ¼ÊΪ¡°<¡±¡°>¡±