Use of LXR 0.11 is not recommended, unless you cannot upgrade your Perl interpretor to version 5.10 at least.

This release is frozen and still contains bugs which have been corrected in later releases. Only "compatibility" bugs will be accepted.

The heart of LXR configuration is a file named lxr.conf which MUST be located in the LXR root directory. A fresh template configuration file ships in the templates/ subdirectory. But a tailored copy has been stored in the lxrconf.d/ directory by the pre-configuration step.
  1. Edit lxrconf.d/lxr.conf with your favorite editor (vi, emacs, KWrite, gedit, …). The file is subdivided into sections to facilitate configuration.
    • Go to the Global configuration section, Auxiliary tools subsection.

      If the pre-configuration step reported both glimpse and swish-e were found on your computer, you must comment out one of the following directive groups:

      , 'glimpsebin' => '/usr/local/bin/glimpse' , 'glimpseindex' => '/usr/local/bin/glimpseindex'

      or:

      , 'swishbin' => '/path/to/your/swishe-e/executable' Important!
      Since only one search engine can be used, comment out either 'glimpsebin' or 'swishbin' by prefixing the line with a pound sign (#).
      Important!
      All the paths in this subsection must be OS-absolute paths.
    • Go to the Computer DNS names subsection to list your computer name(s).

      The host name (complete with protocol and port) comes from parameter 'host_names', a list of the different names under which your host is known to your web server and the DNS servers.

      The value of this parameter must be consistent with the web server configuration. , 'host_names' => [ 'http://localhost' , 'http://localhost.localdomain' , 'http://127.0.0.1' ] As a convenience, you can omit the protocol if it is http:.
    • Go now to the HTML subsection.

      According to your choice of a search engine, have the 'htmlsearch' point to the right template; choose one of the following:

      , 'htmlsearch' => 'templates/html/html-search-swish.html' , 'htmlsearch' => 'templates/html/html-search-glimpse.html' Important!
      The "relative" form is anchored at the LXR root directory. You may also use an OS-absolute path.
    • Proceed to the Tree configuration section and edit the Server configuration subsection to inform LXR how it will be known from the web server.

      The access URL is the concatenation of the host name and the virtual root to the script.

      Parameter 'virtroot' is equal to what comes after the hostname to complete the access URL.

      , 'virtroot' => '/lxr'

      Give a nice title to be displayed on every page:

      , 'caption' => 'My first LXR installation'
    • Go to to the Tree location subsection For this first trial, e shall consider only a tree residing in real directories.

      Set parameter 'sourceroot' to the absolute path of the directory containing the different versions (as subdirectories):

      , 'sourceroot' => '/home/malcolm/indexed-src'

      Give a name for the root of relative paths within your tree:

      , 'sourcerootname' => 'myProject'

      or, to have version identifier inserted:

      , 'sourcerootname' => 'version-$v'
    • Go now to the Version selection subsection.

      Insert into parameter 'range' the names of the subdirectories containing the versions:

      , 'range' => [qw(v1 v2 v3.1 v4 experimental)]

      And modify 'default' to preselect which version LXR will display at start-time.

      , 'default' => 'v4'

      If your source files use include directives, set 'incprefix' to the list of include directories.

      All paths are relative to the source-tree base directory, but do not forget to write them with an initial separator. , 'incprefix' => [ '/include', '/include/linux' ]
    • Finally, go to the Data storage subsection to fix the locations of the auxiliary data storage.

      Tell which data base to use in 'dbname' among the following three:

      # ----- MySql ----- , 'dbname' => 'dbi:mysql:dbname=lxr' # ----- Postgresql ----- , 'dbname' => 'dbi:Pg:dbname=lxr' # ----- Oracle ----- , 'dbname' => 'dbi:Oracle:host=localhost;sid=DEVMMS;port=1521' For MySQL and Postgresql, lxr is the name given when creating the database (see the previous step).

      Do not forget to adjust the access parameters as you defined them in the previous step:

      , 'dbuser' => 'lxr' , 'dbpass' => 'lxrpassword' , 'dbprefix' => 'lxr_' You need to uncomment 'dbprefix' only if it is different from the default.

      And last, give the search engine some room for its private usage:

      , 'glimpsedir' => '/path/to/glimpse/databases' , 'swishdir' => '/a/directory/here/' It is better not to put these directories in your tree directory, because you could get confused (not LXR). Eventhough only one search engine is used, it does no harm to define both. This way, you can freely change your mind about that search engine.
  2. Copy lxr.conf to its final location: $ cp lxrconf.d/lxr.conf .

For an example of parameter values for the demo trees on SourceForge, see here.

You're now ready to load the database with your data.