You can easily read the lxr configuration method in Gentoo of the Web source code, and read the lxr configuration method in Gentoo of the Web source code. Lxr is
Lxr is a web-based source code cross-indexing tool that is very convenient to read the source code. now we record the configuration process. take pidgin-2.4.1 as an example.
1. Installation
Installing lxr in gentoo is very simple. you can directly install emerge. However, note that lxr is written in the perl language and requires the USE Flag of ithreads to be added during installation of perl and libperl, in addition, emerge apache mod_perl mysql is required. if the indexing tool uses glimpse, emerge glimpse. if swish-e is used, USE = freetext emerge lxr.
2. prepare the source code directory.
On my machine,/data/codes/other is used to store third-party projects that I need to read, to configure lxr, create pidgin in the/data/codes/other directory and decompress pidgin to the pidgin directory named 2.4.1, create a version file in the/data/codes/others/pidgin directory and write it to 2.4.1.
3. prepare the database
Run mysql-u root </usr/share/webapps/lxr/0.9.5/sqlscripts/mysql/0.9.5 _ create. SQL creates an lxr library and changes the name of the/var/lib/mysql/lxr library to pidgin. If you want to add another project, you can do similar work.
4. configure lxr
First configure your apache, generate the default web directory, emerge -- config = www-servers/apache-x.x.x, and then modify/etc/conf. d/apache: add the "-d perl" option to APACHE2_OPTS and restart apache. Run cp-pr/usr/share/webapps/lxr/0.9.5/htdocs/var/www/localhost/htdocs/pidgin. if you want to add another project, repeat this cp operation, it is important to configure lxr. conf, upload a pidgin lxr. conf can be referenced.
5. generate an index
Enter/var/www/localhost/htdocs/pidgin, ln-snf/data/codes/other/pidgin/lxr. conf and then execute. /genxref -- url = http: // localhost/pidgin to generate an index, because the release field in the lxr_releases table created by lxr conflicts with the mysql keyword, you need to modify/usr/lib/perl5/vendor_perl/5.8.8/LXR/Index/Mysql. pm file, which adds the release field in the SQL statement to 'release'.) now it is basically accessible.