码迷,mamicode.com
首页 > 系统相关 > 详细

ubuntu如何配置lxr

时间:2017-05-28 16:52:12      阅读:322      评论:0      收藏:0      [点我收藏+]

标签:form   ret   first   0.11   rar   检查   tin   ase   title   

 配置好源
deb http://old-releases.ubuntu.com/ubuntu natty main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu natty-security main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu natty-updates main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu natty-proposed main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu natty-backports main restricted universe multiverse
deb-src http://old-releases.ubuntu.com/ubuntu natty main restricted universe multiverse
deb-src http://old-releases.ubuntu.com/ubuntu natty-security main restricted universe multiverse
deb-src http://old-releases.ubuntu.com/ubuntu natty-updates main restricted universe multiverse
deb-src http://old-releases.ubuntu.com/ubuntu natty-proposed main restricted universe multiverse
deb-src http://old-releases.ubuntu.com/ubuntu natty-backports main restricted universe multiverse


1 perl
14.04 本来就有
11.04 也是有

 

2 ctags
sudo apt-get install exuberant-ctags
https://sourceforge.net/projects/ctags/files/
从这里下载,然后解压,通过以下命令编译
./configure --prefix=/usr/local/ctags
make && make install
sudo vi /etc/bash.bashrc
export PATH=/usr/local/ctags/bin:$PATH


3 mysql-server
sudo apt-get install mysql-server
root: aishenghuo526

4 lighttpd
sudo apt-get install lighttpd

5 glimse
sudo apt-get install flex (安装前需要安这个)
wget http://webglimpse.net/trial/glimpse-latest.tar.gz
./configure
make
make install

6 perl DBI
# perl -MCPAN -e shell
cpan> install DBI

perl Makefile.PL
make
make test
make install

7 perl File::MMagic
# perl -MCPAN -e shell
cpan> install File::MMagic
DBD::mysql

8 安装LXR 源代码
LXR的根目录:/usr/local/share/lxr/
这可以服务整个系统
在这可以用使用以下命令检查已经安装了什么
./genxref --checkonly
但是这里有些没有安装是正常的(glimpse switch-e肯定有一个没有安装),由于没配置,也会出现一9些变量没有定义。

9 配置LXR
./scripts/configure-lxr.pl --v
记录完整的配置过程
LXR root directory is /usr/local/share/lxr
Configuration will be stored in custom.d/

Configure for single/multiple trees? [S/m] > s
Do you intend to add other trees later? [yes/NO] > N

 

LXR can be located at the server-root (so called dedicated)
or lower in the server hierarchy (shared because there are
usually other pages or sections).
Server type? [dedicated/SHARED] > dedicated

 

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.
--- Host name or IP? [localhost] > localhost
--- Alias name or IP? > //linux.lxr.org
--- Alias name or IP? >

 

Database engine? [MYSQL/oracle/postgres/sqlite] > MYSQL
--- Directory for glimpse databases?/usr/local/share/lxr/glimpse_DB

--- Use ‘buttons-and-menus‘ instead of ‘link‘ interface? [YES/no] > YES

 

* LXR master configuration file setup *

Global section part

 

*** Configuring auxiliary tool paths
*** Host name previously defined as http://localhost
*** 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] > YES
*** Configuring file subsection
*** Configuring "common factors"
*** Marking tree section

--- Caption in page header? (e.g. Project XYZZY displayed by LXR) > Project Linux displayed by LXR

Do you need a specific encoding for this tree ? [yes/NO] > NO

How is your tree stored? [FILES/cvs/git/svn/hg/bk] > FILES

--- Source directory? (e.g. /home/myself/project-tree) > /home/andrew/Downloads/linux

Name to display for the path root? (e.g. Project or $v for version) [$v] > $v

Label for version selection menu? [Version] > Version

Version enumeration method? [LIST/file/function] > LIST
--- Version name? > 0.11
--- Version name? (hit return to stop) > 0.12
--- Version name? (hit return to stop) >

--- Default displayed version is first in ‘range‘? [YES/no] > YES

Directory to ignore, e.g. CVSROOT or CVS? (hit return to stop) >

Include directory, e.g. /include? (hit return to stop) >

*** Configuring data storage
--- Database name? > lxr_linux_
--- 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

10 使用刚才创建好的脚本来配置数据库
andrew@andrew-virtual-machine:/usr/local/share/lxr$ ./custom.d/initdb.sh
*** MySQL - Creating tree user lxr
Enter password:
*** MySQL - Creating tree database lxr_linux_
*** MySQL - Configuring tables lxr_ in database lxr_linux_

11 拷贝复制文件到lxr根目录
cp custom.d/lxr.conf .

12 创建索引
要注意文件夹的名称是
/home/andrew/Downloads/linux/0.12
/home/andrew/Downloads/linux/0.11 (版本号,是用文件夹名称来做的)

./genxref --url=http://localhost --allversions (这是生成所有版本的索引)
如果是单独某个一版本,则是
./genxref --url=(刚才配置地址) --version=(刚配置的版本号)

 

13 配置网页服务器
我使用lighttpd,版本是lighttpd/1.4.28
显示不出source这个程序

14 安装appache2 来试试
sudo apt-get install apache2
apt-get install libapache2-mod-perl2-dev
激活它
sudo a2enmod version
sudo service apache2 restart
(参考网页)https://sourceforge.net/p/lxr/discussion/86145/thread/a2b8392e/
cp custom.d/apache-lxrserver.conf /etc/apache2/conf.d

然后可以使用。 

ubuntu如何配置lxr

标签:form   ret   first   0.11   rar   检查   tin   ase   title   

原文地址:http://www.cnblogs.com/hwy89289709/p/6915894.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!