要下载和使用lxr和glimpse
1,
#tar -zxvf glimpse-latest.tar.gz
#cd glimpse-4.18.5
#apt-get install flex
在glimpse的编辑过程需要使用到flex
#sh configre
#make
#make install
2,
#tar -zxvf lxr-0.3.1.tar.gz
#cd lxr-0.3
#vi lxr.conf
修改下列一行
INSTALLPREFIX=/var/www/lxr
#make install
3,
#cd /var/www/lxr
#mkdir lib
#cd lib
#mv /var/download/linux-2.6.18 ./
#cd /var/www/lxr/http
#vi .htaccess
<Files ~ (search|source|ident|diff|find)$>
SetHandler cgi-script
</Files>
#vi lxr.conf
variable: v, Version, [/var/www/lxr/source/versions], [/var/www/lxr/source/defversion]
baseurl: http://var/www/lxr/http/
htmlhead: /var/www/lxr/http/template-head
htmltail: /var/www/lxr/http/template-tail
htmldir: /var/www/lxr/http/template-dir
sourceroot: /var/www/lxr/lib/linux-2.6.18/
srcrootname: linux-2.6.18
dbdir: /var/www/lxr/source/2.6.18/
#cd /var/www/lxr/source
#vi versions
2.6.18
#vi defversion
2.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-default
<Directory "/var/www/lxr/http">
Options All
AllowOverride All
</Directory>
#/etc/ini.d/apache2 restart
5,在浏览器中输入http://localhost/lxr/http/source