最終更新:2013-11-09 (土) 14:54:38 (3792d)
configure-lxr.pl
Top / configure-lxr.pl
ツリー別
シングルツリーの時
[root@localhost lxr]# ./scripts/configure-lxr.pl -vv *** LXR configurator (version: 1.13) *** LXR root directory is /usr/local/share/lxr Configuration will be stored in custom.d/ directory custom.d created Configure for single/multiple trees? [S/m] > S Do you intend to add other trees later? [yes/NO] > *** LXR web server configuration *** LXR can be configured as the default server (the only service in your computer), a section of this default server or an independent server (with its own host name). Refer to the User's Manual for a description of the differences. Web server type? [1.DEFAULT /2.section in default /3.indepedent /4.section in indepedent ] > 2 The computer hosting the server is described by an URL. The form is scheme://host_name:port where: - scheme is either http or https (http: can be omitted), - host_name can be given as an IP address such as 123.45.67.89 or a domain name like localhost or lxr.url.example, - port may be omitted if standard for the scheme. The following question asks for a primary URL. Later, you'll have the opportunity to give aliases to this primary URL. --- Host name or IP? [//localhost] > URL section name for LXR in your server? [/lxr] > *** LXR database configuration *** The choice of the database engine can make a difference in indexing performance, but resource consumption is also an important factor. * For a small personal project, try SQLite which do not need a server and is free from configuration burden. * For medium to large projects, choice is between MySQL, PostgreSQL and Oracle. Oracle is not a free software, its interface has not been tested for a long time. * PostgreSQL databases are smaller than MySQL's and performance is roughly equivalent. * MySQL is at its best with large-sized projects (such as kernel cross-referencing) where it is fastest at the cost of bigger databases. * Take also in consideration the number of connected users. Database engine? [MYSQL/oracle/postgres/sqlite] > --- Directory for glimpse databases? > /usr/local/share/lxr/glimpse templates directory templates/ now protected read-only Is your Apache version 2.4 or higher? [YES/no] > no file .htaccess written into LXR root directory file apache2-require.pl written into configuration directory file apache-lxrserver.conf written into configuration directory file lighttpd-lxrserver.conf written into configuration directory Mercurial support files written into configuration directory *** LXR master configuration file setup *** Global section part *** Configuring auxiliary tool paths *** Configuring host name or IP (as http://...) *** Host name previously defined as //localhost --- Alias name ? (hit return to stop) > lxr.onakasuita.org --- Alias name ? (hit return to stop) > *** Configuring HTML parameters *** 'Buttons-and-menus' interface is recommended for the kernel *** to avoid screen cluttering. --- Use 'buttons-and-menus' instead of 'link' interface? [YES/no] > *** Configuring file subsection *** Configuring "common factors" *** Marking tree section *** LXR master configuration file setup *** Tree section part SQL script for database initialisation *** Configuring LXR server parameters *** The virtual root is the fixed URL part after the hostname. *** You previously defined the virtual root as /lxr --- Caption in page header? (e.g. Project XYZZY displayed by LXR) > Linux kernel Do you need a specific encoding for this tree ? [yes/NO] > *** Describing tree location How is your tree stored? [FILES/cvs/git/svn/hg/bk] > *** A source directory contains one sub-directory for every version. --- Source directory? (e.g. /home/myself/project-tree) > /var/www/lxr/kernel Name to display for the path root? (e.g. Project or $v for version) [$v] > *** Enumerating versions Label for version selection menu? [Version] > *** Versions can be explicitly enumerated, be read from a file or computed *** by a function. The latter case is recommended for VCS-stored trees. Version enumeration method? [LIST/file/function] > file --- Version file? (absolute path or relative to LXR root dir.) > /var/www/lxr/kernel/versions *** By default, first version in list is displayed. You may also indicate *** a prefered version. --- Default displayed version is first in 'range'? [YES/no] > *** Setting directory lists *** Some directories may contain non-public project data (binaries, *** compilers caches, SCM control data, ...). They can be hidden from LXR. --- Directory to ignore, e.g. CVSROOT or CVS? (hit return to stop) > *** If your source code uses "include" statements (#include, require, ...) *** LXR needs hints to resolve the destination file. --- Include directory, e.g. /include? (hit return to stop) > *** Configuring data storage --- Database name? > lxr_kernel --- DB user name? [lxr] > --- DB password? [lxrpw] > --- DB table prefix? [lxr_] > configuration saved in custom.d/lxr.conf DB initialisation sript is custom.d/initdb.sh
マルチツリーの時
[root@localhost lxr]# ./scripts/configure-lxr.pl -vv *** LXR configurator (version: 1.13) *** LXR root directory is /usr/local/share/lxr Configuration will be stored in custom.d/ directory custom.d created Configure for single/multiple trees? [S/m] > m *** LXR web server configuration *** LXR can be configured as the default server (the only service in your computer), a section of this default server or an independent server (with its own host name). Refer to the User's Manual for a description of the differences. Web server type? [1.DEFAULT /2.section in default /3.indepedent /4.section in indepedent ] > 2 The computer hosting the server is described by an URL. The form is scheme://host_name:port where: - scheme is either http or https (http: can be omitted), - host_name can be given as an IP address such as 123.45.67.89 or a domain name like localhost or lxr.url.example, - port may be omitted if standard for the scheme. The following question asks for a primary URL. Later, you'll have the opportunity to give aliases to this primary URL. --- Host name or IP? [//localhost] > URL section name for LXR in your server? [/lxr] > source The built-in method to manage several trees with a single instance of LXR is to include a designation of the tree in the URL at the end of the section name. This sequence after host name is called "virtual root". Supposing one of your trees is to be referred as "my-tree", an URL to list the content of the default version directory would presently be: //localhostsource/my-tree/source with virtual root equal to source/my-tree Use built-in multiple trees management with tree designation at end of virtual root? [YES/no] > *** LXR database configuration *** The choice of the database engine can make a difference in indexing performance, but resource consumption is also an important factor. * For a small personal project, try SQLite which do not need a server and is free from configuration burden. * For medium to large projects, choice is between MySQL, PostgreSQL and Oracle. Oracle is not a free software, its interface has not been tested for a long time. * PostgreSQL databases are smaller than MySQL's and performance is roughly equivalent. * MySQL is at its best with large-sized projects (such as kernel cross-referencing) where it is fastest at the cost of bigger databases. * Take also in consideration the number of connected users. Database engine? [MYSQL/oracle/postgres/sqlite] > The safest option is to create one database per tree. You can however create a single database for all your trees with a specific set of tables for each tree (though this is not recommended). How do you setup the databases? [PER TREE/global] > All databases can be accessed with the same username and can also be described under the same names. Will you share database characteristics? [YES/no] > Will you use the same username and password for all DBs? [YES/no] > --- DB user name? [lxr] > --- DB password ? [lxrpw] > Will you give the same prefix to all tables? [YES/no] > --- Common table prefix? [lxr_] > --- Directory for glimpse databases? > /usr/local/share/lxr/glimpse templates directory templates/ now protected read-only Is your Apache version 2.4 or higher? [YES/no] > no file .htaccess written into LXR root directory file apache2-require.pl written into configuration directory file apache-lxrserver.conf written into configuration directory file lighttpd-lxrserver.conf written into configuration directory Mercurial support files written into configuration directory *** LXR master configuration file setup *** Global section part *** Configuring auxiliary tool paths *** Configuring host name or IP (as http://...) *** Host name previously defined as //localhost --- Alias name ? (hit return to stop) > *** Configuring HTML parameters *** 'Buttons-and-menus' interface is recommended for the kernel *** to avoid screen cluttering. --- Use 'buttons-and-menus' instead of 'link' interface? [YES/no] > *** Configuring file subsection *** Configuring "common factors" *** Marking tree section *** LXR master configuration file setup *** Tree section part SQL script for database initialisation *** Configuring LXR server parameters *** The virtual root is the fixed URL part after the hostname. *** The tree needs to be uniquely identified as e.g. source/the_tree --- Tree designation for URL? (e.g. the_tree) > kernel --- Caption in page header? (e.g. Project XYZZY displayed by LXR) > Linux Kernel Source Do you want a speed switch button for this tree ? [YES/no] > --- Short title for button? (e.g. XYZZY) > kernel Do you need a specific encoding for this tree ? [yes/NO] > *** Describing tree location How is your tree stored? [FILES/cvs/git/svn/hg/bk] > *** A source directory contains one sub-directory for every version. --- Source directory? (e.g. /home/myself/project-tree) > /var/www/lxr/kernel Name to display for the path root? (e.g. Project or $v for version) [$v] > *** Enumerating versions Label for version selection menu? [Version] > *** Versions can be explicitly enumerated, be read from a file or computed *** by a function. The latter case is recommended for VCS-stored trees. Version enumeration method? [LIST/file/function] > file --- Version file? (absolute path or relative to LXR root dir.) > /var/www/lxr/kernel/versions *** By default, first version in list is displayed. You may also indicate *** a prefered version. --- Default displayed version is first in 'range'? [YES/no] > *** Setting directory lists *** Some directories may contain non-public project data (binaries, *** compilers caches, SCM control data, ...). They can be hidden from LXR. --- Directory to ignore, e.g. CVSROOT or CVS? (hit return to stop) > *** If your source code uses "include" statements (#include, require, ...) *** LXR needs hints to resolve the destination file. --- Include directory, e.g. /include? (hit return to stop) > *** Configuring data storage --- Database name? > lxrkernel 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] > no configuration saved in custom.d/lxr.conf DB initialisation sript is custom.d/initdb.sh
生成されるファイル
apache2-require.pl
apache-lxrserver.conf
# # Web server configuration for LXR server # # $Id: apache-lxrserver.conf,v 1.6 2013/01/21 10:49:36 ajlittoz Exp $ # # # Cannot grant Apache 2.2/2.4 implicit compatibility because Require # directive syntax and semantics changed between releases. # When updating 2.2 -> 2.4, uncomment 2.4 specific lines # ================================================= # # ------- URL black magic for multiple trees ------ # # NOTE: this is the built-in default management method. # Adapt it to fit your custom management. # Comment out for single tree operation AliasMatch ^source/[^/]+/(.*) "/usr/local/share/lxr/$1" # ================================================= # # ------- Simple URL for a single tree ------ # # Uncomment for single tree operation # Alias source "/usr/local/share/lxr" # ================================================= # # ----------- Perl security checks ----------- # # If these checks cause trouble (i.e. too many # error or warning messages in Apache's error log), # comment out the lines. <IfDefine MODPERL2> PerlSwitches -T </IfDefine> <IfDefine !MODPERL2> PerlTaintCheck On </IfDefine> # ================================================= # # ----------- LXR startup configuration ----------- # # This is valid only for Apache 2.x # Apache 1.x requires manual modification of Perl library. # See LXR installation manual <IfModule mod_version.c> # Assume Apache 2.x and above since mod_version appeared in 2.0 # This is safer than using <IfVersion> since this tag # causes an error with 1.x # However, when this configuration file is parsed, # mod_perl may not yet be loaded; consequently, the older # directive is used. Happily, it is still recognised by newer # versions of mod_perl. <IfDefine MODPERL2> # ----------------> absolute path to the LXR root directory PerlPostConfigRequire /usr/local/share/lxr/custom.d/apache2-require.pl </IfDefine> <IfDefine !MODPERL2> # ----------------> absolute path to the LXR root directory PerlRequire /usr/local/share/lxr/custom.d/apache2-require.pl </IfDefine> </IfModule> # ================================================= # # ----------- LXR directory access ----------- # # ----------------> absolute path to the LXR root directory <Directory "/usr/local/share/lxr"> Options FollowSymLinks AllowOverride AuthConfig FileInfo Limit Options # Apache 2.2 access control Order allow,deny # up to Apache 2.2 Allow from all # from Apache 2.4 # Require all granted </Directory>
hg.rc
hg-lxr-ext.py
inidb.sh
echo "*** MySQL - Creating global user lxr" mysql -u root -p <<END_OF_USER drop user 'lxr'@'localhost'; END_OF_USER mysql -u root -p <<END_OF_USER create user 'lxr'@'localhost' identified by 'lxrpw'; grant all on *.* to 'lxr'@'localhost'; END_OF_USER echo "*** MySQL - Creating tree database lxrkernel" mysql -u lxr -plxrpw <<END_OF_CREATE drop database if exists lxrkernel; create database lxrkernel; END_OF_CREATE echo "*** MySQL - Configuring tables lxr_ in database lxrkernel" mysql -u lxr -plxrpw <<END_OF_TEMPLATE use lxrkernel; /*あとはテーブルの作成とか*/
lighttpd-lxrserver.conf
lxr.conf
lxr.ctxt
メモ
- MySQLでDB名にハイフンが含まれるとinitdbでエラー。