Dragonfly 发表于 2003-5-25 11:33:06

i will go to sleep and see how are u going tomorrow. good luck

jjww 发表于 2003-5-25 11:36:37

我按你说的改了,还是不行。:(
我的apache在/usr/local/apache下,页面是htdocs目录,缺省安装就是这样的。
第2点,也按你的改了。
<Directory /usr/local/apache/htdocs/lxr>
Options All
AllowOverride All
</Directory>
在/usr/local/apache/htdocs/lxr/source/目录下也添加了version和defversion文件,都只有一行"2.5.9"
在/usr/local/apache/htdocs/http/目录下,也创建了.htaccess文件。
还是不行,访问http://10.1.0.177/lxr/source/就列出目录文件。:(

lihuabo 发表于 2003-5-25 11:37:13

你的lxr.conf文件中
“sourceroot: /home/httpd/htdocs/lxr/source/$v/ "
而我想看"/usr/src/linux-2.4.18-14"
那么写成”sourceroot:/usr/src/linux-2.4.18-14"行不行?

jjww 发表于 2003-5-25 12:10:12

dragonfly,你的httpd.conf里,不用改cgi-bin的设置,htdocs/lxr/http/下的perl能执行吗?
要不你把httpd.conf也贴一下。我觉得不改cgi-bin不能执行,但是怎么改也不对。:(

hit007 发表于 2003-5-25 16:28:46

看看这个帖子

http://www.linuxsir.com/bbs/showthread.php?s=&threadid=28400

里面有详细的介绍

jjww 发表于 2003-5-25 21:41:28

我发现我的perl-db没有装,我正在试

Dragonfly 发表于 2003-5-25 21:44:02

我按你说的改了,还是不行。:(
我的apache在/usr/local/apache下,页面是htdocs目录,缺省安装就是这样的。
第2点,也按你的改了。
<Directory /usr/local/apache/htdocs/lxr>
Options All
AllowOverride All
</Directory>
在/usr/local/apache/htdocs/lxr/source/目录下也添加了version和defversion文件,都只有一行"2.5.9"
在/usr/local/apache/htdocs/http/目录下,也创建了.htaccess文件。
还是不行,访问http://10.1.0.177/lxr/source/就列出目录文件。:(

u need access http://localhost/lxr/http/source/
not http://localhost/lxr/source/
.htaccess is under /home/httpd/htdocs/lxr/http. so if u install lxr as /usr/local/apache/htdocs/lxr, u should add to /usr/local/apache/htdocs/lxr/http

Dragonfly 发表于 2003-5-25 21:44:56

我发现我的perl-db没有装,我正在试

yes, u need that DB::File

jjww 发表于 2003-5-26 10:30:39

so ft!!
我装了perl-db还是不行,
# ./genxref /var/www/html/lxr/source/2.5.9/
Can't locate DB_File.pm in @INC (@INC contains: lib/ /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl .) at ./genxref line 31.
BEGIN failed--compilation aborted at ./genxref line 31.

访问http://10.1.0.177/lxr/http/source/
Object not found!
The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.
If you think this is a server error, please contact the webmaster
Error 404
10.1.0.177
Sun 25 May 2003 07:22:41 PM EDT
Apache/2.0.40 (Red Hat Linux)

Dragonfly 发表于 2003-5-26 10:35:16

"Can't locate DB_File.pm" u need downlaod and install db_file from cpan.org

try this http://localhost/lxr/http/source?

i really want to ssh into u sysem to see what happened

jjww 发表于 2003-5-26 16:11:30

ft!!!
这是我的安装过程,最后可以看见相关信息了,但是无论点什么链接都是得到空白页。 :oops:
需要的软件包:glimpse-latest.tar.gz,lxr-0.3.tar.gz,perl-5.8.0.tar.gz,假设你本机已有httpd。
Step1
假设http的目录,以RedHat8为例:
配置文件/etc/httpd/conf/httpd.conf
根目录/var/www/html/

Step2.1
安装:
#tar zxvf glimpse-latest.tar.gz
#cd glimpse-4.17.4
#./configure && make && make install
则glimpse包安装在/usr/local/bin目录下。
Step2.2
#tar zxvf perl-5.8.0.tar.gz
#cd perl-5.8.0
#./Configure –d
#make && make install
则perl安装在/usr/local/bin/目录中。
Step2.3
#tar zxvf lxr-0.3.tar.gz
#cd lxr-0.3
#vi Makefile
修改:
PERLBIN=/usr/local/bin/perl
INSTALLPREFIX=/var/www/html/lxr
#make install

Step3
#cd /var/www/html/lxr/http
编辑.htaccess
<Files ~ (search|source|ident|diff)$>
SetHandler cgi-script
</Files>
编辑lxr.conf
variable: v, Version, ,
variable: a, Architecture, (i386, alpha, m68k, mips, ppc, sparc, sparc64)
baseurl: http:/10.1.0.177/lxr/
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/
srcrootname: Linux
incprefix: /include
dbdir: /var/www/html/lxr/source/$v/
glimpsebin: /usr/local/bin/glimpse
map: /include/asm[^\/]*/ /include/asm-$a/
map: /arch/[^\/]+/ /arch/$a/

Step4
#cd /var/www/html/lxr/source/
编辑versions和defversion
都是一行:2.5.9
#mkdir 2.5.9 (source在这个目录下)

Step5
#cd /var/www/html/lxr/bin
#./genxref /var/www/html/lxr/source/2.5.9/
# glimpseindex -H . /var/www/html/lxr/source/2.5.9/

Step6
#cd /etc/httpd/conf
#vi httpd.conf
添加:
<Directory /var/www/html/lxr/http>
    Options All
    AllowOverride All
    order allow, deny
    allow from all
</Directory>
#cd /etc/rc.d/init.d
#./httpd restart

现在可以访问http://10.1.0.177/lxr/http/source/

Dragonfly 发表于 2003-5-26 21:48:15

u step 5 has problem, u should do
cd /var/www/html/lxr/source/2.5.9
/var/www/html/lxr/bin/genxref .
glimpseindex -H . .

the trick here is genxref will generate two files: fileidx and xref. and glimpseindex will generate 7 .glimpse_xx files. since u already set the dbdir as/var/www/html/lxr/source/$v/ , u have to make sure that these files are generated in source/$v/ dir. if u have interest, u can read source, ident,,. they all are perl script and use dbdir/fileidx to open these files.
i am not sure if u can copy the existed generated files to the dir. but u can try. if so, that is fine. if not, u have to regenerate as i said.

since u can run the genxref, i think u have DB::File module already.

so till here u should be able to see u code via browser. one minor issue is that u see fileidx and xref from browser. since u do not see those .glimpse_xxx, i think u know how to handle them to let them disapear.

good luck.

lihuabo 发表于 2003-5-27 15:59:18

斑竹同志:我终于搞定了,看到了源代码。。。只是以同样的方法在另一位朋友的机子上安装却怎么也不成功。。最后我只好把问题归结于他的apache 上了。
还有个问题,要是在自己安装的apache 环境下安装lxr应该怎么做?

jjww 发表于 2003-5-27 17:45:36

昏,don't cry for me, Argentina! :wink:
我还差一点,
在访问http://10.1.0.177/lxr/http/source/都可以,
比如说,我点击identifier search的时候,页面就跳至http://10.0.177/lxr/ident
应该是http://10.0.177/lxr/http/ident才对呀。昏呀 :cry:

jjww 发表于 2003-5-27 19:23:27

我又改了, 重新genxref了, 也变成了http://10.0.177/lxr/http/ident,可是页面出错.
点下面的目录还是出错.
页: 1 [2] 3 4 5 6
查看完整版本: 为什么这个版块没有介绍lxr的文章呢?