$ yum install git inkscape postgresql postgresql-server texlive ctags perl-CGI-Ajax perl-CGI-Simple perl-DBD-Pg perl-HTML-Parser perl-Template-Toolkit perl-Term-ProgressBar.noarch perl-Term-Size perl-TermReadKey perl-Devel-Size gcc gcc-c++ texlive-utils texlive-latex perl-ExtUtils-MakeMaker perl-CPAN perl-YAML libpng libpng-devel texinfo perl-Digest-SHA1 wget http make icoutils xapian-core perl-Search-Xapian perl-CPAN perl-Search-Xapian gifsicle
$ cd /tmp && wget http://www.ctan.org/get/fonts/bbding/bbding.ins http://www.ctan.org/get/fonts/bbding/bbding.dtx
$ cpan $ cpan -fi Search::Xapian
$ mkdir /opt; cd /opt $ git clone git://lxr.linux.no/git/lxrng.git $ cd lxrng $ cp lxrng.conf-dist lxrng.conf $ cp apache2-site.conf-dist-cgi apache2-site.conf $ chkconfig httpd on $ chkconfig postgresql on $ service postgresql initdb $ service postgresql start
$ iptables -I INPUT 1 -p tcp --dport 80 -j ACCEPT $ iptables -I INPUT 1 -p tcp --dport 5432 -j ACCEPT $ service iptables save
$ cd /tmp $ cp /usr/share/texmf/fonts/tfm/public/niceframe/bbding10.tfm . $ tex bbding.ins $ mkdir /usr/share/texmf/tex/latex/bbding $ mv bbding.sty /usr/share/texmf/tex/latex/bbding/. $ texhash $ fmtutil-sys --all
$ set -i 's/ident sameuser/password/' /var/lib/pgsql/data/pg_hba.conf
$ su - postgres
-bash-4.1$ createuser -P lxr Enter password for new role: Enter it again: Shall the new role be a superuser? (y/n) n Shall the new role be allowed to create databases? (y/n) n Shall the new role be allowed to create more new roles? (y/n) n -bash-4.1$ createuser -P lxradmin Enter password for new role: Enter it again: Shall the new role be a superuser? (y/n) n Shall the new role be allowed to create databases? (y/n) y Shall the new role be allowed to create more new roles? (y/n) n -bash-4.1$ createuser -P apache Enter password for new role: Enter it again: Shall the new role be a superuser? (y/n) n Shall the new role be allowed to create databases? (y/n) n Shall the new role be allowed to create more new roles? (y/n) n -bash-4.1$ -bash-4.1$ createdb lxrng -O lxr -bash-4.1$ exit
$ service postgresql restart
$ mkdir /var/lib/lxrng/text-db -p $ mkdir /var/lib/lxrng/cache $ chmod a+rw /var/lib/lxrng $ chmod a+rw /var/lib/lxrng/cache/
$ make -C /opt/lxrng/webroot/.static/gfx $ mkdir -p /var/lib/lxrng/repos/ $ cd /var/lib/lxrng/repos/ $ git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git $ cd linux-2.6/ $ git tag
$ cd /opt/lxrng/ $ sed -i 's:@@LXRURL@@::' apache2-site.conf $ sed -i 's:@@LXRROOT@@:/opt/lxrng:' apache2-site.conf $ vi apache2-site.conf
... # For LXRng installed directly in the web site root, use ScriptAlias / "/opt/lxrng/webroot/lxr.cgi/" # otherwise use (no trailing slash): # ScriptAlias / "/opt/lxrng/webroot/lxr.cgi" ...
$ vi lxrng.conf
... 'base_url' => 'http://localhost/', ... 'ver_default' => 'v2.6.34', ...
$ ./lxr-db-admin linux --init
$ ln -s /opt/lxrng/apache2-site.conf /etc/httpd/conf.d/.
$ service httpd restart $ setenforce 0 $ ./lxr-genxref linux
If you are willing to database for a downloaded source, change following stuff in lxrng.conf
use LXRng::Repo::Plain;
my $plainrepo = LXRng::Repo::Plain ->new('Source Path');
ver_list => ['Project Name'], ver_default => 'Project Name',
Possible lxrng.conf example with two applications.
# -*- mode: perl -*- # Configuration file # # use LXRng::Index::PgBatch; use LXRng::Repo::Git; use LXRng::Search::Xapian; use LXRng::Repo::Plain; my $linuxindex = LXRng::Index::PgBatch->new(db_spec => 'dbname=lxrng;port=5432', db_user => "", db_pass => "", # table_prefix => 'lxr' ); my $linuxrepo = LXRng::Repo::Git ->new('/var/lib/lxrng/repos/linux-2.6/.git', release_re => qr/^v[^-]*$/, author_timestamp => 0); my $linuxsearch = LXRng::Search::Xapian->new('/var/lib/lxrng/text-db/linux-2.6'); my $rhevindex = LXRng::Index::PgBatch->new(db_spec => 'dbname=rhev;port=5432', db_user => "", db_pass => "", # table_prefix => 'lxr' ); my $rhevrepo = LXRng::Repo::Plain->new('/var/lib/lxrng/repos/rhev'); my $rhevsearch = LXRng::Search::Xapian->new('/var/lib/lxrng/text-db/rhev'); return { 'linux' => { 'repository' => $linuxrepo, 'index' => $linuxindex, 'search' => $linuxsearch, 'base_url' => 'http://localhost/', # Must be writable by httpd user: 'cache' => '/var/lib/lxrng/cache/linux', 'fs_charset' => 'iso-8859-1', # Tried successively 'content_charset' => ['utf-8', 'iso-8859-1'], 'languages' => ['C', 'GnuAsm', 'Kconfig'], 'ctags_flags' => ["-I@$LXRng::ROOT/lxr-ctags-quirks"], 'ver_list' => [$linuxrepo->allversions], 'ver_default' => 'v2.6.34', 'include_maps' => [ [qr|^arch/(.*?)/|, qr|^asm/(.*)|, sub { "include/asm-$_[0]/$_[1]" }], [qr|^include/asm-(.*?)/|, qr|^asm/(.*)|, sub { "include/asm-$_[0]/$_[1]" }], [qr|^|, qr|^asm/(.*)|, sub { map { "include/asm-$_/$_[0]" } qw(i386 alpha arm ia64 m68k mips mips64), qw(ppc s390 sh sparc sparc64 x86_64) }], [qr|^|, qr|(.*)|, sub { "include/$_[0]" }], ], }, 'rhev' => { 'repository' => $rhevrepo, 'index' => $rhevindex, 'search' => $rhevsearch, 'base_url' => 'http://localhost/', # Must be writable by httpd user: 'cache' => '/var/lib/lxrng/cache/rhev', 'fs_charset' => 'iso-8859-1', # Tried successively 'content_charset' => ['utf-8', 'iso-8859-1'], 'languages' => ['C', 'GnuAsm', 'Kconfig', 'Generic' ], 'ctags_flags' => ["-I@$LXRng::ROOT/lxr-ctags-quirks"], 'ver_list' => [$rhevrepo->allversions], # 'ver_default' => 'rhev', }, };
I’m still suffering to make it to show hyperlink lists shows up. I guess it’s because it failed to execute ‘ctags-exuberant’ because I saw lots of messages regarding that as is shown below.
Can’t execute “ctags-exuberant”: No such file or directory at ./lxr-genxref line 191.”
Leave a Reply