Easy to read the lxr configuration method in Gentoo of Web source code

Source: Internet
Author: User
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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.