Chinaunix
标题:
Cross-Referencing Linux Browse the code
[打印本页]
作者:
bird123
时间:
2004-10-16 23:02
标题:
Cross-Referencing Linux Browse the code
最近在读Linux源代码时,安装了lxr-0.3.tar.gz(http://lxr.linux.no),把安装方法贴出来,供各位网友参考
解压后,修改Makefile,PERLBIN不用修改,INSTALLPREFIX改为
INSTALLPREFIX=/var/www/html/lxr
然后make install
我看的源代码版本为2.4.0,软件包linux-2.4.0.tar.bz2,在/var/www/html/lxr/source目录下,建立目录linux-2.4.0,进入linux-2.4.0目录,解压linux-2.4.0.tar.bz2
在/var/www/html/lxr/source目录下生成versions,defversion文件,内容为:
linux-2.4.0
修改/var/www/html/lxr/http/lxr.conf文件:
baseurl: http:/127.0.0.1/lxr/http/
htmlhead: /var/www/html/lxr/http/template-head
htmltail: /var/www/html/lxr/http/template-tail
htmldir: /var/www/html/lxr/http/template-dir
sourceroot: /var/www/html/lxr/source/$v/linux/
dbdir: /var/www/html/lxr/source/
/var/www/html/lxr/http/.htaccess文件内容为:
<Files ~ (search|source|ident|diff|find)$>;
SetHandler cgi-script
</Files>;
/etc/httpd/conf/httpd.conf文件最后添加:
# Cross Reference Stuff
<Directory /home/httpd/html/lxr>;
Options All
AllowOverride All
</Directory>;
在/var/www/html/lxr/source目录下执行:
../bin/genxref linux-2.4.0/linux
修改fieldidx文件权限:
chmod 644 fieldidx
在本地浏览器上输入网址:
http://127.0.0.1/lxr/source
把127.0.0.1改为网卡的IP地址,就可以在其它机器上浏览源代码
欢迎光临 Chinaunix (http://bbs.chinaunix.net/)
Powered by Discuz! X3.2