This is the recommended configuration if you want to index several projects. Content of this page applicable before release 1.0. CAUTION!
If you add projects after the initial LXR set-up, you should run the following command to avoid inadvertantly erasing your existing databases: $ rm ./custom.d/initdb.sh # avoid trouble
  1. You need to create a database for each source tree (or project)

    An LXR database is defined either as a real independent database, or as an alternate table set in an existing database.

    1. Independent database This is the default case if you chose the "per-tree" database option.

      The new database is described by configuration parameters 'dbname', 'dbuser' and 'dbpass'. 'dbprefix' can keep its default value.

      This case does not apply to the Oracle engine.

      To describe a new tree with its own database, launch script configure-lxr.pl with option --add and answer questions:

      $ configure-lxr.pl --add Your DB engine was: MySQL Advanced users can configure different DB engines for different trees. This is not recommended for average users. Use previous DB engine? [YES/no] > --- Virtual root? (e.g. /lxr/something) > /lxr/newtree --- Caption in page header? (e.g. Project XYZZY displayed by LXR) > New project Do you want a speed switch button for this tree ? [YES/no] > n Do you need a specific encoding for this tree ? [yes/NO] > How is your tree stored? [FILES/>cvs/git/bitkeeper] > --- Source directory? (e.g. /home/myself/project-tree) > /home/myself/new_project Name to display for the path root? (e.g. Project or $v for version) [$v] > Label for version selection menu? [Version] > Version enumeration method? [LIST/file/function] > --- Version name? (hit return to stop) > 1.0 --- Version name? (hit return to stop) > --- Default displayed version is first in 'range'? [YES/no] > --- Directory to ignore, e.g. CVSROOT or .git? (hit return to stop) > --- Include directory, e.g. /include? (hit return to stop) > --- Database name? > new_project_DB Do you want to override the global 'lxr' user name? [yes/NO] > Do you want to override the global 'lxr_' table prefix? [yes/NO] > *** Configure another tree? [YES/no] > n

      Configuration consists essentially in giving a new database name.

    2. Alternate table set This is the default case if you chose the "global" database option. It can also be used with the "per-tree" option by specifying an existing database name and new table prefix.

      The table names in the new set start with the prefix defined by configuration parameter 'dbprefix'. The 'dbname', 'dbuser' and 'dbpass' parameters keep the same values for all trees.

      It is then wise to "common factor" them in the global parameter group during initial configuration or manual tuning of lxr.conf.

      To describe a new tree with different tables, launch script configure-lxr.pl with option --add and answer questions:

      $ configure-lxr.pl --add Your DB engine was: MySQL Advanced users can configure different DB engines for different trees. This is not recommended for average users. Use previous DB engine? [YES/no] > --- Virtual root? (e.g. /lxr/something) > /lxr/newtree --- Caption in page header? (e.g. Project XYZZY displayed by LXR) > New project Do you want a speed switch button for this tree ? [YES/no] > n Do you need a specific encoding for this tree ? [yes/NO] > How is your tree stored? [FILES/>cvs/git/bitkeeper] > --- Source directory? (e.g. /home/myself/project-tree) > /home/myself/new_project Name to display for the path root? (e.g. Project or $v for version) [$v] > Label for version selection menu? [Version] > Version enumeration method? [LIST/file/function] > --- Version name? (hit return to stop) > 1.0 --- Version name? (hit return to stop) > --- Default displayed version is first in 'range'? [YES/no] > --- Directory to ignore, e.g. CVSROOT or .git? (hit return to stop) > --- Include directory, e.g. /include? (hit return to stop) > --- Database name? > existing_project_DB Do you want to override the global 'lxr' user name? [yes/NO] > Do you want to override the global 'lxr_' table prefix? [yes/NO] > yes --- DB table prefix? [lxr_] > other_prefix_ *** Configure another tree? [YES/no] > n

      Configuration consists essentially in giving an existing database name and a new table prefix.

  2. Update configuration

    Copy the augmented lxr.conf configuration file and physically create the database:

    $ cp ./custom.d/lxr.conf . $ ./custom.d/initdb.sh
  3. Index your trees

    Run the genxref script for each tree (see the this page).

    $ ./genxref --url=...