首先下载和使用lxr和glimpse1,#tar -zxvf glimpse-latest.tar.gz#cd glimpse-4.18.5#apt-get install flex在glimpse的编辑过程需要使用到flex#sh configre#make#make install2,#tar -zxvf lxr-0.3.1.tar.gz#cd lxr-0.3#vi lxr.conf修改下列一行INSTALLPREFIX=/var/www/lxr#make install3,#cd /var/www/lxr#mkdir lib#cd lib#mv /var/download/linux-2.6.18 ./#cd /var/www/lxr/http#vi .htaccessSetHandler cgi-script#vi lxr.confvariable: v, Version, [/var/www/lxr/source/versions], [/var/www/lxr/source/defversion]baseurl: http://var/www/lxr/http/htmlhead: /var/www/lxr/http/template-headhtmltail: /var/www/lxr/http/template-tailhtmldir: /var/www/lxr/http/template-dirsourceroot: /var/www/lxr/lib/linux-2.6.18/srcrootname: linux-2.6.18dbdir: /var/www/lxr/source/2.6.18/#cd /var/www/lxr/source#vi versions2.6.18#vi defversion2.6.18#mkdir 2.6.18#cd /var/www/lxr/source/2.6.18#/var/www/lxr/bin/genxref /var/www/lxr/lib/linux-2.6.18/#glimpseindex -H . /var/www/lxr/lib/linux-2.6.18/#chmod 755 *#chmod 755 .*4,#cd /etc/apache2/sites-enabled#vi 000-defaultOptions AllAllowOverride All#/etc/ini.d/apache2 restart5,在浏览器中输入http://localhost/lxr/http/source/