前言:折腾了好几天,终于把LXR搭建起来了,还好没有放弃,要不就失去了了解LXR,mysql,glimpse,apache的机会了。
除了使用LXR来浏览源码,还可以用global,请参考《 GNU GLOBAL Source Code Tag System浏览源码,很方便》http://blog.csdn.net/sanlinux/archive/2010/05/31/5637852.aspx
1.glimpse
http://webglimpse.net/trial/glimpse-latest.tar.gz,安装方法可参考READER.INSTALL
We have a script "configure" in our distribution which has recently been
very much improved. To generate makefiles for your system, run
sh configure
( see ./configure --help for options )
Then run
make
make install
to put binaries under /usr/local/bin. To install to a different directory,
see the --prefix and --bindir options of configure.
2.ctags
#yum install ctags
3.mysql
#yum install mysql mysql-server
4.httpd,mod_perl,perl的mysql驱动
#yum install mod_perl
注意:一般GNU/Linux系统中,httpd/apache以及perl都会已经安装好了。所以,就不用再重新安装了。如果没有安装也不用担心,建立一个yum本地源,然后安装,那也是很快的,yum本地源的安装方法请参考:《为Fedora 12设置本地YUM源 》http://blog.csdn.net/sanlinux/archive/2010/06/08/5656820.aspx
5.安装LXR,并创建mysql数据库。
5.1.LXR安装包下载安装
从http://sourceforge.net/projects/lxr/中选择0.96这个版本,0.98这个版本会报错:
[@INC /usr/sbin/lib . /usr/local/lib/perl5/site_perl/5.10.0/i386-linux-thread-multi /usr/local/lib/perl5/site_perl/5.10.0 /usr/lib/perl5/ vendor_perl/5.10.0/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.10.0 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.10.0/i386-linux- thread-multi /usr/lib/perl5/5.10.0 /usr/lib/perl5/site_perl /etc/httpd $0 /usr/local/lxr/source
可能的原因:Mysql5及其上的数据库服务器,由于其将release设定为保留关键字,所以需要修改两个文件initdb-mysql 和 /usr/local/lxr/lib/LXR/Index/Mysql.pm,将里面的release改为`release`
安装步骤如下:
#cd /usr/local
#tar zxvf lxr-0.9.6.tgz
#mv lxr-0.9.6 lxr
#cd /usr/local/lxr
#cp templates/* .
将lib/LXR目录拷贝到/usr/lib/perl5/site_perl目录下,如果没有site_perl,则创建。
#cp -rf /usr/local/lxr/lib/* /usr/lib/perl5/site_perl
#cp /usr/local/lxr/Local.pm /usr/lib/perl5/site_perl
5.2.创建mysql数据库:
#/etc/init.d/mysqld start
#mysql -u root 如果有密码,请加-p参数。
#mysql>./ initdb-mysql
5.3.在/usr/local/lxr/目录下创建src目录,并在src目录下创建versions文件,文件内容如下:
#cat /usr/local/lxr/src/versions
0.11
2.6.30
5.3.建立源码索引
#cd /usr/local/lxr/src
#ln -s ~/Download/linux-0.11 0.11
#ln -s ~/Download/linux-2.6.30 2.6.30
5.4.http.conf和lxr.conf配置修改
当把文件都准备好,并且也放在相应的路径下以后,我们开始修改http.conf和lxr.conf文件。
=============================================
***********/etc/httpd/conf/httpd.conf
=============================================
546 Alias /lxr "/usr/local/lxr"
547 <Directory "/usr/local/lxr">
548 AllowOverride all
549 Options FollowSymLinks
550 <Files ~ (find|search|source|ident|diff|cgi-bin)$>
551 SetHandler perl-script
552 PerlHandler ModPerl::Registry
553 Options +ExecCGI
554 ForceType text/html(必须的,如果没有则显示html代码)
555 </Files>
556 </Directory>
=============================================
***********/usr/local/lxr/lxr.conf
=============================================
请参考附件
6.精髓之处在这
6.1.建立glimpse索引
#cd /usr/local/lxr/0.11
find . -name "*.[chS]" -follow | glimpseindex -H . -o -F
#cd /usr/local/lxr/2.6.30
find . -name "*.[chS]" -follow | glimpseindex -H . -o -F
此步生成8个.glimpse开头的文件
-rw-r--r-- 1 root root 4249 2010-02-14 04:03 .glimpse_filenames
-rw-r--r-- 1 root root 416 2010-02-14 04:03 .glimpse_filenames_index
-rw-r--r-- 1 root root 0 2010-02-14 04:03 .glimpse_filetimes
-rw-r--r-- 1 root root 56089 2010-02-14 04:03 .glimpse_index
-rw-r--r-- 1 root root 485 2010-02-14 04:03 .glimpse_messages
-rw-r--r-- 1 root root 19400 2010-02-14 04:03 .glimpse_partitions
-rw-r--r-- 1 root root 261 2010-02-14 04:03 .glimpse_statistics
-rw-r--r-- 1 root root 262144 2010-02-14 04:03 .glimpse_turbo
#ls -la /usr/local/lxr/src/0.11/
total 396
drwxr-xr-x 10 root root 4096 2010-02-14 04:03 .
drwxr-xr-x 3 root root 4096 2010-02-14 04:15 ..
drwxr-xr-x 2 root root 4096 2010-02-14 04:02 boot
drwxr-xr-x 2 root root 4096 2010-02-14 04:02 fs
-rw-r--r-- 1 root root 4249 2010-02-14 04:03 .glimpse_filenames
-rw-r--r-- 1 root root 416 2010-02-14 04:03 .glimpse_filenames_index
-rw-r--r-- 1 root root 0 2010-02-14 04:03 .glimpse_filetimes
-rw-r--r-- 1 root root 56089 2010-02-14 04:03 .glimpse_index
-rw-r--r-- 1 root root 485 2010-02-14 04:03 .glimpse_messages
-rw-r--r-- 1 root root 19400 2010-02-14 04:03 .glimpse_partitions
-rw-r--r-- 1 root root 261 2010-02-14 04:03 .glimpse_statistics
-rw-r--r-- 1 root root 262144 2010-02-14 04:03 .glimpse_turbo
drwxr-xr-x 5 root root 4096 2010-02-14 04:02 include
drwxr-xr-x 2 root root 4096 2010-02-14 04:02 init
drwxr-xr-x 5 root root 4096 2010-02-14 04:02 kernel
drwxr-xr-x 2 root root 4096 2010-02-14 04:02 lib
-rw-r--r-- 1 root root 3126 2010-02-14 04:02 Makefile
drwxr-xr-x 2 root root 4096 2010-02-14 04:02 mm
drwxr-xr-x 2 root root 4096 2010-02-14 04:02 tools
#ls -la /usr/local/lxr/src/2.6.30/
total 56792
drwxr-xr-x 22 san san 4096 2010-02-14 04:38 .
drwxr-xr-x 8 san san 4096 2010-02-14 04:13 ..
drwxr-xr-x 24 san san 4096 2009-06-10 11:05 arch
drwxr-xr-x 2 san san 4096 2009-06-10 11:05 block
-rw-r--r-- 1 san san 18693 2009-06-10 11:05 COPYING
-rw-r--r-- 1 san san 93847 2009-06-10 11:05 CREDITS
drwxr-xr-x 3 san san 4096 2009-06-10 11:05 crypto
drwxr-xr-x 83 san san 12288 2009-06-10 11:05 Documentation
drwxr-xr-x 84 san san 4096 2009-06-10 11:05 drivers
drwxr-xr-x 33 san san 4096 2009-06-10 11:05 firmware
drwxr-xr-x 70 san san 4096 2009-06-10 11:05 fs
-rw-r--r-- 1 san san 885 2009-06-10 11:05 .gitignore
-rw-r--r-- 1 root root 1570093 2010-02-14 04:38 .glimpse_filenames
-rw-r--r-- 1 root root 110948 2010-02-14 04:38 .glimpse_filenames_index
-rw-r--r-- 1 root root 0 2010-02-14 04:24 .glimpse_filetimes
-rw-r--r-- 1 root root 34647574 2010-02-14 04:38 .glimpse_index
-rw-r--r-- 1 root root 585072 2010-02-14 04:38 .glimpse_messages
-rw-r--r-- 1 root root 20508550 2010-02-14 04:38 .glimpse_partitions
-rw-r--r-- 1 root root 272 2010-02-14 04:38 .glimpse_statistics
-rw-r--r-- 1 root root 262144 2010-02-14 04:38 .glimpse_turbo
drwxr-xr-x 20 san san 4096 2009-06-10 11:05 include
drwxr-xr-x 2 san san 4096 2009-06-10 11:05 init
drwxr-xr-x 2 san san 4096 2009-06-10 11:05 ipc
-rw-r--r-- 1 san san 2430 2009-06-10 11:05 Kbuild
drwxr-xr-x 6 san san 4096 2009-06-10 11:05 kernel
drwxr-xr-x 6 san san 4096 2009-06-10 11:05 lib
-rw-r--r-- 1 san san 4021 2009-06-10 11:05 .mailmap
-rw-r--r-- 1 san san 148271 2009-06-10 11:05 MAINTAINERS
-rw-r--r-- 1 san san 55126 2009-06-10 11:05 Makefile
drwxr-xr-x 2 san san 4096 2009-06-10 11:05 mm
drwxr-xr-x 47 san san 4096 2009-06-10 11:05 net
-rw-r--r-- 1 san san 17080 2009-06-10 11:05 README
-rw-r--r-- 1 san san 3172 2009-06-10 11:05 REPORTING-BUGS
drwxr-xr-x 7 san san 4096 2009-06-10 11:05 samples
drwxr-xr-x 12 san san 4096 2009-06-10 11:05 scripts
drwxr-xr-x 7 san san 4096 2009-06-10 11:05 security
drwxr-xr-x 21 san san 4096 2009-06-10 11:05 sound
drwxr-xr-x 2 san san 4096 2009-06-10 11:05 usr
drwxr-xr-x 3 san san 4096 2009-06-10 11:05 virt
6.2.建立identity索引
#cd /usr/local/lxr
#./genxref --version=0.11 --url=http://127.0.0.1/lxr
#./genxref --version=2.6.30 --url=http://127.0.0.1/lxr
6.3.修改权限
#cd /usr/local/
#su -
#chown apache.apache -R lxr
7.重启服务
#/etc/init.d/httpd restart
#/etc/init.d/mysqld restart
8.数据库更新
如果仅仅是添加新的源码树,则只需修改src/versions文件,并重新glimpse索引。但是,如果遇到目录名变化的情况,而数据库使用的依然是老名字,则需重新建立glimpse和identity索引。
附件:lxr.conf
# -*- mode: perl -*-
# Configuration file
#
(
{
# Global configuration
# Path to glimpse executables.
# Define this OR the swish-e variable depending which search engine you want to use.
'glimpsebin' => '/usr/local/bin/glimpse',
'glimpseindex' => '/usr/local/bin/glimpseindex',
# Location of SWISH-E binary
####'swishbin' => '/usr/local/bin/swish-e',
# Path to Exuberant Ctags executable
'ectagsbin' => '/usr/bin/ctags',
# Place where lxr can write temporary files
'tmpdir' => '/tmp',
# Location of the Generic.pm config file
'genericconf' => '/usr/lib/perl5/site_perl/LXR/Lang/generic.conf',
# Location of the ectags.conf file
'ectagsconf' => '/usr/lib/perl5/site_perl/LXR/Lang/ectags.conf',
# Paths for CVS module
'cvspath' => '/bin:/usr/local/bin:/usr/bin:/usr/sbin',
},
{
# Configuration for http://192.168.1.3/lxr.
# baseurl is used to select configuration block.
'baseurl' => 'http://127.0.0.1/lxr', # Put your URL here
# baseurl_aliases allows other URLs to be used to reach the site
# comment this out if you do not want any aliases
'baseurl_aliases' => [ 'http://localhost/lxr', 'http://mydomain/lxr' ],
'virtroot' => '/lxr', # The bit after the / above
'variables' => {
# Define typed variable "v". This is the list of versions to index.
'v' => {
'name' => 'Version',
# This can come from a file, a function or be explicitly
# ennumerated.
# From a file:
'range' => [ readfile('/usr/local/lxr/src/versions') ],
# Explicitly:
# 'range' => [qw(v1 v2 v3.1 v4 experimental)],
# If files within a tree can have different versions,
# e.g in a CVS tree, 'range' can be specified as a
# function to call for each file:
#'range' => sub { return
# ($files->allreleases($LXR::Common::pathname),
# $files->allrevisions($LXR::Common::pathname))
# }, # deferred function call.
#
# When using a GIT repo, you can use its tags
# to create a list of versions. As an extra
# bonus, with the Linux::KernelSort Perl module,
# you can properly sort kernel versions. Just
# leave it off for generic projects.
#
# Simple example for any GIT repo:
# 'range' => sub {
# my $some_dir = "/path/to/project/.git/refs/tags";
# opendir (DIR, $some_dir) || die "cannot opendir $some_dir: $!";
# my @files = grep { -f "$some_dir/$_" } readdir (DIR);
# closedir DIR;
# return sort @files;
# },
#
# Advanced example for Linus's upstream
# linux-2.6 kernel repository:
# 'range' => sub {
# use Linux::KernelSort;
# my $kernel = new Linux::KernelSort;
#
# my $some_dir = "/path/to/linux-2.6/.git/refs/tags";
# opendir (DIR, $some_dir) || die "cannot opendir $some_dir: $!";
# my @files = grep { -f "$some_dir/$_" } readdir (DIR);
# closedir DIR;
# # Linus's tags all have a leading "v"
# # which we must cut off for sorting
# # add again afterwards.
# for (my $i = 0; $i < scalar (@files); $i++) {
# $files[$i] =~ s/^v//;
# }
# @files = $kernel->sort (@files);
# for (my $i = 0; $i < scalar (@files); $i++) {
# $files[$i] =~ s/^/v/;
# }
#
# return @files;
# },
# The default version to display
'default' => '0.11'
},
# Define typed variable "a". First value is default.
'a' => {
'name' => 'Architecture',
'range' => [qw(i386 alpha arm m68k mips ppc sparc sparc64)]
},
},
# These do funky things to paths in the system - you probably don't need them.
'maps' => {
'/include/asm[^//]*/' => '/include/asm-$a/',
'/arch/[^//]+/' => '/arch/$a/',
},
# Templates used for headers and footers
'htmlhead' => '/usr/local/lxr/html-head.html',
'htmltail' => '/usr/local/lxr/html-tail.html',
'htmldir' => '/usr/local/lxr/html-dir.html',
'htmlident' => '/usr/local/lxr/html-ident.html',
'htmlident_refs' => '/usr/local/lxr/html-ident-refs.html',
'htmlfind' => '/usr/local/lxr/html-find.html',
'htmlsearch' => '/usr/local/lxr/html-search-swish.html',
'sourcehead' => '/usr/local/lxr/html-head.html',
'sourcedirhead' => '/usr/local/lxr/html-head.html',
'stylesheet' => '/usr/local/lxr/lxr.css',
# sourceroot - where to get the source files from
# For ordinary directories, this specifies a directory which has each version as a
# subdirectory e.g.
# indexed-src/version1/...
# indexed-src/version2/...
# The names of the version directories must match the values for the Version
# variable above.
'sourceroot' => '/usr/local/lxr/src',
# Alternatively, this can specify a CVS repository by setting the value to "cvs:"
# followed by the path to the repository. Note this must be file accessible - remote
# server access does NOT work.
# 'sourceroot' => 'cvs:/hom/karsk/a/CVSROOT/linux',
# For a BitKeeper repository, specify bk: followed by the path to the
# repository. For BK it is also necessary to specify a 'cachepath' parameter in
# the 'sourceparams' value below. This should point to a directory where the
# code can write and read files.
# 'sourceroot' => 'bk:/some/repository/here',
# Finally, you can also use GIT, Linux Kernel's new
# distributes SCM to access the history:
# 'sourceroot' => 'git:/some/repository/.git'
# 'sourceroot' => 'git:/some/repostitory.git'
# The `sourceroot' config variable points to the directory
# in which you find the `objects', `refs', `index' etc.
# directories.
# The name to display for this source tree
'sourcerootname' => 'SANTec',
#
# Any parameters to the source access method should be specified below.
#
# BK: 'cachepath' is used for temporary files
# GIT: if `do_annotations' is non-zero, the file revision that
# introduced each line is displayed.
# `do_blame' will add the author of each line to the
# output. Keep in mind that the core LXR code
# will only request author information if
# annotations are switched on, too!
#
'sourceparams' => {
'cachepath' => '/a/path/here',
'do_annotate' => 1,
'do_blame' => 1,
},
# The DBI identifier for the database to use
# For mysql, the format is dbi:mysql:dbname=<name>
# for Postgres, it is dbi:Pg:dbname=<name>
# for Oracle, it is dbi:Oracle:host=localhost;sid=DEVMMS;port=1521
'dbname' => 'dbi:mysql:dbname=lxr',
# If you need to specify the username or password for the database connection,
# uncomment the following two lines
# 'dbpass' => 'foo',
# 'dbuser' => 'lxr',
# If you need multiple lxr configurations in one database, set different table
# prefixes for them.
# 'dbprefix' => 'lxr_',
# For using glimpse, the directory to store the .glimpse files in is required
'glimpsedir' => '/usr/local/lxr/src/',
# Location of swish-e index database files if using swish-e
###'swishdir' => '/a/directory/here/',
# where to look for include files inside the sourcetree. This is used to hyperlink
# to included files.
'incprefix' => [ '/include', '/include/linux' ],
# Which extensions to treat as images when browsing. If a file is an image,
# it is displayed.
'graphicfile' => '(?i)/.(gif|jpg|jpeg|pjpg|pjpeg|xbm|png)$', #'
# How to map files to languages
# Note that the string for the key and the first entry in the
# array MUST match
'filetype' => {
# Format is
# Language name, filepatten regexp, module to invoke,
# (optional )tabwidth
# Note that to have another language supported by Generic.pm,
# you must ensure that:
# a) exuberant ctags supports it
# b) generic.conf is updated to specify information about the language
# c) the name of the language given here matches the entry in generic.conf
'C' => [
'C', '/.c$|/.pc$' #'
, 'LXR::Lang::Generic', '8'
],
'C++' => [
'C++',
'/.C$|((?i)/.c/+/+$|/.cc$|/.cpp$|/.cxx$|/.h$|/.hh$|/.hpp$|/.hxx$|/.h/+/+$)' #'
, 'LXR::Lang::Generic', '8'
],
# Some languages are commented out until the relevant entries in generic.conf are made
# The list here is the set supported by ctags 5.0.1
# 'Beta' => [ 'Beta', '(?i)/.bet$', 'LXR::Lang::Generic' ],
# 'Eiffel' => [ 'Eiffel', '(?i)/.e$', 'LXR::Lang::Generic' ],
# 'Fortran' =>
# [ 'Fortran', '(?i)/.f$|/.for$|/.ftn$|/.f77$|/.f90$|/.f95$', 'LXR::Lang::Generic' ],
'Cobol' => [ 'Cobol', '(?i)/.cob$', 'LXR::Lang::Cobol' ],
'Java' => [ 'Java', '(?i)/.java$', 'LXR::Lang::Java', '4' ],
# 'Lisp' => [
# 'Lisp', '(?i)/.cl$|/.clisp$|/.el$|/.l$|/.lisp$|/.lsp$|/.ml$', 'LXR::Lang::Generic'
# ],
# No tabwidth specified here as an example
'Make' => [ 'Make', '(?i)/.mak$|(?i)/.mk$|makefile*', 'LXR::Lang::Generic' ],
# 'Pascal' => [ 'Pascal', '(?i)/.p$|/.pas$', 'LXR::Lang::Generic' ],
'Perl' => [ 'Perl', '(?i)/.pl$|/.pm$|/.perl$', 'LXR::Lang::Generic', '4' ],
'php' => [ 'php', '(?i)/.php$|/.php3$|/.phtml$', 'LXR::Lang::Generic', '2' ],
'Python' => [ 'Python', '(?i)/.py$|/.python$', 'LXR::Lang::Generic', '4' ],
# 'rexx' => [ 'rexx', '(?i)/.cmd$|/.rexx$|/.rx$', 'LXR::Lang::Generic' ],
# 'ruby' => [ 'ruby', '(?i)/.rb$', 'LXR::Lang::Generic' ],
# 'scheme' => [ 'scheme', '(?i)/.sch$|/.scheme$|/.scm$|/.sm$', 'LXR::Lang::Generic' ],
'shell' => [ 'shell', '(?i)/.sh$|/.bsh$|/.bash$|/.ksh$|/.zsh$', 'LXR::Lang::Generic' ],
# 's-Lang' => [ 's-Lang', '(?i)/.sl$', 'LXR::Lang::Generic' ],
'SQL' => [ 'SQL', '(?i)/.sql$|/.pks$|/.pkb$', 'LXR::Lang::Generic' ],
'VB' => [ 'VB', '(?i)/.bas$|/.cls$|/.ctl$|/.frm$|/.vbs$', 'LXR::Lang::Generic' ],
#'tcl' => [ 'tcl', '(?i)/.tcl$|/.wish$', 'LXR::Lang::Generic' ],
},
# Maps interpreter names to languages. The format is:
# regexp => langname
# regexp is matched against the part after #! on the first line of a file
# langname must match one of the keys in filetype above.
#
# This mapping is only used if the filename doesn't match a pattern above, so
# a shell script called shell.c will be recognised as a C file, not a shell file.
'interpreters' => {
'perl' => 'Perl',
'bash' => 'shell',
'csh' => 'shell',
'python' => 'Python',
'ksh' => 'shell',
'zsh' => 'shell',
'sh' => 'shell',
'ksh' => 'shell',
},
# a link of the form (prefix)($filepath)(postfix) is generated when viewing a file
# example for cvsweb:
#'cvswebprefix' => 'http://cvs.myhost.com/cgi-bin/cvsweb.cgi',
#'cvswebpostfix' => '?cvsroot=rootname',
# example for viewcvs:
#'cvswebprefix' => 'http://cvs.myhost.com/cgi-bin/viewcvs.cgi/myroot',
#'cvswebpostfix' => '',
# Directories to always ignore. These usually are the SCM's
# private directories which possibly may contain non-public
# project history.
'ignoredirs' => ['CVSROOT', '.git'],
}
)
其它
#ls /usr/local/lxr -la
total 280
drwxr-xr-x 6 1000 1000 4096 2010-02-14 04:05 .
drwxr-xr-x 14 root root 4096 2010-02-14 03:47 ..
-rw-r--r-- 1 1000 1000 105 2002-01-19 15:23 BUGS
-rw-r--r-- 1 1000 1000 54288 2009-03-26 00:51 ChangeLog
-rw-r--r-- 1 1000 1000 834 2002-02-27 00:18 CREDITS.txt
-rw-r--r-- 1 1000 1000 183 2005-11-03 07:39 .cvsignore
-rwxr-xr-x 1 1000 1000 5113 2005-11-03 07:39 diff
-rwxr-xr-x 1 1000 1000 4304 2004-09-02 23:26 find
-rwxr-xr-x 1 1000 1000 6181 2009-03-24 00:51 genxref
-rw-r--r-- 1 1000 1000 2502 1999-06-16 17:17 HACKING
-rw-r--r-- 1 1000 1000 309 2009-03-23 23:49 .htaccess-apache1
-rw-r--r-- 1 1000 1000 301 2009-03-24 00:41 .htaccess-apache2
-rw-r--r-- 1 1000 1000 290 2009-03-23 22:34 .htaccess_cgi
-rw-r--r-- 1 root root 748 2010-02-14 03:47 html-dir.html
-rw-r--r-- 1 root root 686 2010-02-14 03:47 html-find.html
-rw-r--r-- 1 root root 1156 2010-02-14 03:47 html-head.html
-rw-r--r-- 1 root root 508 2010-02-14 03:47 html-ident.html
-rw-r--r-- 1 root root 136 2010-02-14 03:47 html-ident-refs.html
-rw-r--r-- 1 root root 1125 2010-02-14 03:47 html-search-glimpse.html
-rw-r--r-- 1 root root 1433 2010-02-14 03:47 html-search-swish.html
-rw-r--r-- 1 root root 724 2010-02-14 03:47 html-tail.html
-rwxr-xr-x 1 1000 1000 4194 2004-09-02 23:26 ident
-rw-r--r-- 1 1000 1000 2051 2009-03-23 20:27 initdb-mysql
-rw-r--r-- 1 1000 1000 3326 2004-10-26 04:18 initdb-oracle.sql
-rw-r--r-- 1 1000 1000 1905 2006-12-21 03:54 initdb-postgres
-rw-r--r-- 1 1000 1000 9594 2009-03-23 23:49 INSTALL
drwxr-xr-x 3 1000 1000 4096 2009-03-26 00:51 lib
-rw-r--r-- 1 1000 1000 18009 2001-08-15 23:50 LICENSE
-rw-r--r-- 1 1000 1000 14069 2004-07-22 04:44 Local.pm
-rw-r--r-- 1 root root 11002 2010-02-14 04:05 lxr.conf
-rw-r--r-- 1 root root 2892 2010-02-14 03:47 lxr.css
-rw-r--r-- 1 1000 1000 614 2000-01-05 15:54 notes
-rw-r--r-- 1 1000 1000 426 2007-04-15 06:33 RELEASING
-rwxr-xr-x 1 1000 1000 8718 2006-04-08 21:37 search
-rwxr-xr-x 1 1000 1000 7808 2005-11-03 07:39 source
drwxr-xr-x 3 root root 4096 2010-02-14 04:15 src
-rw-r--r-- 1 1000 1000 622 2004-07-14 23:00 swish-e.conf
drwxr-xr-x 2 1000 1000 4096 2009-03-26 00:51 templates
drwxr-xr-x 2 1000 1000 4096 2009-03-26 00:51 tests
#ls /usr/local/lxr/src/ -la
total 16
drwxr-xr-x 3 root root 4096 2010-02-14 04:15 .
drwxr-xr-x 6 1000 1000 4096 2010-02-14 04:05 ..
drwxr-xr-x 10 root root 4096 2010-02-14 04:03 0.11
lrwxrwxrwx 1 root root 32 2010-02-14 04:15 2.6.30 -> ~/Downloads/linux-2.6.30
-rw-r--r-- 1 root root 12 2010-02-14 04:15 versions
#ls /usr/local/lxr/src/0.11/ -la
total 396
drwxr-xr-x 10 root root 4096 2010-02-14 04:03 .
drwxr-xr-x 3 root root 4096 2010-02-14 04:15 ..
drwxr-xr-x 2 root root 4096 2010-02-14 04:02 boot
drwxr-xr-x 2 root root 4096 2010-02-14 04:02 fs
-rw-r--r-- 1 root root 4249 2010-02-14 04:03 .glimpse_filenames
-rw-r--r-- 1 root root 416 2010-02-14 04:03 .glimpse_filenames_index
-rw-r--r-- 1 root root 0 2010-02-14 04:03 .glimpse_filetimes
-rw-r--r-- 1 root root 56089 2010-02-14 04:03 .glimpse_index
-rw-r--r-- 1 root root 485 2010-02-14 04:03 .glimpse_messages
-rw-r--r-- 1 root root 19400 2010-02-14 04:03 .glimpse_partitions
-rw-r--r-- 1 root root 261 2010-02-14 04:03 .glimpse_statistics
-rw-r--r-- 1 root root 262144 2010-02-14 04:03 .glimpse_turbo
drwxr-xr-x 5 root root 4096 2010-02-14 04:02 include
drwxr-xr-x 2 root root 4096 2010-02-14 04:02 init
drwxr-xr-x 5 root root 4096 2010-02-14 04:02 kernel
drwxr-xr-x 2 root root 4096 2010-02-14 04:02 lib
-rw-r--r-- 1 root root 3126 2010-02-14 04:02 Makefile
drwxr-xr-x 2 root root 4096 2010-02-14 04:02 mm
drwxr-xr-x 2 root root 4096 2010-02-14 04:02 tools
#ls -la /usr/lib/perl5/
total 80
drwxr-xr-x 6 root root 4096 2010-02-14 03:58 .
dr-xr-xr-x 153 root root 57344 2010-02-14 04:34 ..
drwxr-xr-x 45 root root 4096 2010-02-13 05:42 5.10.0
drwxr-xr-x 3 root root 4096 2010-02-14 03:59 site_perl
drwxr-xr-x 3 root root 4096 2010-02-13 06:59 site_perl.old
drwxr-xr-x 3 root root 4096 2009-12-01 23:22 vendor_perl
#ls -la /usr/lib/perl5/site_perl
total 28
drwxr-xr-x 3 root root 4096 2010-02-14 03:59 .
drwxr-xr-x 6 root root 4096 2010-02-14 03:58 ..
-rw-r--r-- 1 root root 14069 2010-02-14 03:59 Local.pm
drwxr-xr-x 5 root root 4096 2010-02-14 03:58 LXR
#ls -la /usr/lib/perl5/site_perl/LXR/
total 72
drwxr-xr-x 5 root root 4096 2010-02-14 03:58 .
drwxr-xr-x 3 root root 4096 2010-02-14 03:59 ..
-rw-r--r-- 1 root root 23158 2010-02-14 03:58 Common.pm
-rw-r--r-- 1 root root 4887 2010-02-14 03:58 Config.pm
drwxr-xr-x 2 root root 4096 2010-02-14 03:58 Files
-rw-r--r-- 1 root root 2702 2010-02-14 03:58 Files.pm
drwxr-xr-x 2 root root 4096 2010-02-14 03:58 Index
-rw-r--r-- 1 root root 1339 2010-02-14 03:58 Index.pm
drwxr-xr-x 2 root root 4096 2010-02-14 03:58 Lang
-rw-r--r-- 1 root root 2739 2010-02-14 03:58 Lang.pm
-rw-r--r-- 1 root root 4034 2010-02-14 03:58 SimpleParse.pm
-rw-r--r-- 1 root root 2587 2010-02-14 03:58 Tagger.pm
本文文本及LXR效果图下载链接:
http://d.download.csdn.net/down/2443604/sanlinux
http://hi.csdn.net/attachment/201006/9/0_1276092749EK9K.gif