最終更新:2014-04-11 (金) 12:03:48 (4111d)  

LXR 1.2
Top / LXR 1.2

ディレクトリ

LXRのインストール先(推奨)/usr/local/share/lxr
GlimpseのDBの設置場所/usr/local/share/lxr/glimpse
ソースコードの設置先/var/www/lxr/kernel

インストールのドキュメント

手順

Step 1: LXR Tools Installation

Step 2: LXR Core Installation

  • tgzを落としてきて/usr/local/share/lxrに展開
  • ./genxref --checkonlyで環境チェック

Step 3: LXR and Database Configuration

  • ./scripts/configure-lxr.pl -vv でDBの設定とか。
  • 設定はcustom.dに生成される。
    • LXR web server configuration
    • LXR database configuration
    • LXR master configuration file setup
      • Global section part
      • Tree section part

メモ

  • MySQLのユーザとかを作成するスクリプトを生成してくれるのであらかじめユーザを作っておく必要はない。

セットアップ後

  • $ cp custome.d/lxr.conf
    $ custom.d/initdb.sh
    # cp custom.d/apache-lxrserver.conf /etc/httpd/conf.d/
    # cd /home/www/kernel
    # ls -1 | grep -v versions > versions
    # chown -R apache.apache *
    # ./genxref --allurls --allversions

実際に入れてみる

もろもろ

  • rpm -Uhv http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
    yum -y install cvs rcs ctags httpd mod_perl mysql-server mysql 
    yum -y --enablerepo=rpmforge install perl-File-MMagic-XS perl-File-MMagic.noarch  libdbi libdbi-dbd-mysql libdbi-drivers perl-Digest-SHA1 perl-String-Approx perl-Apache-DBI.noarch flex
  • Glimpseを使うのでswish-e?swish-e-devel?は不要
  • Flexを追加した

MySQLの設定

  • service mysqld start
    mysql_secure_installation

Glimpse

  • cd ~
    wget http://webglimpse.net/trial/glimpse-latest.tar.gz
    tar xf glimpse-latest.tar.gz
    cd glimpse-4.18.6/
    ./configure
    make
    make install
    
    glimpse -V

LXRのインストール

  • cd ~
    wget http://sourceforge.net/projects/lxr/files/stable/lxr-1.2.0.tgz
    cd /usr/local/share
    tar -zxf ~/lxr-1.2.0.tgz
    mv lxr-1.2.0 lxr
    cd lxr
    
    [root@localhost lxr]# ./genxref --checkonly
    ERROR: could not open configuration file lxr.conf
    [  OK  ]     Perl     version ... 5.10.1
    Parameter 'ectagsbin' not defined - trying to find ctags
    ctags found at /usr/bin/ctags
    [  OK  ]     ctags    version ... 5.8
    Parameter 'glimpsebin' not defined - trying to find glimpse
    glimpse found at /usr/local/bin/glimpse
    Checked:    glimpse   version ... 4.18.5
    Parameter 'glimpseindex' not defined - trying to find glimpseindex
    glimpseindex found at /usr/local/bin/glimpseindex
    Checked: glimpseindex version ... 4.18.5
    Parameter 'swishbin' not defined - trying to find swish-e
    swish-e not found, `command -v swish-e` returned a null s

必要なディレクトリの作成

  • mkdir /usr/local/share/lxr/glimpse
    mkdir /var/www/lxr/

configure-lxr.pl

  • cp custom.d/apache-lxrserver.conf /etc/httpd/conf.d/
    custom.d/initdb.sh

ソースコードの設置

  • cd /var/www/lxr/source
    ls -1 | grep -v versions > versions
    chown -R apache.apache *

インデックス開始

  • cd /usr/local/shared/lxr
    ./genxref --allurls --allversions

参考

関連