配置好源
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

然后可以使用。

转载于:https://www.cnblogs.com/hwy89289709/p/6915894.html

ubuntu如何配置lxr相关推荐

  1. Ubuntu 22.04.1 配置 LXR 阅读Linux kernel源码

    配置环境 首先更新一下 $ sudo apt-get update 根据lxr的官方文档, 我们需要准备Perl,ctags $ sudo apt-get install perl universal ...

  2. ubuntu bind9 配置简单记录

    ubuntu bind9 配置简单记录 ubuntu版本:Ubuntu 12.04.2 bind9安装:apt-get install bind9 bind9配置文件目录:/etc/bind bind ...

  3. Ubuntu下配置Nginx HTTPS

    HTTPS(全称:Hypertext Transfer Protocol over Secure Socket Layer),是以安全为目标的HTTP通道,简单讲是HTTP的安全版.即HTTP下加入S ...

  4. Ubuntu nfs配置

    Ubuntu nfs配置 被挂载端(10.0.0.2): # apt-get install nfs-kernel-server # vi /etc/exports 按a或i进入编辑模式 /home ...

  5. openocd调试Linux内核,Ubuntu下配置OpenOCD+FT2232

    Ubuntu下配置OpenOCD+FT2232 [1]确认调试器方案 将调试器插到电脑上,lsusb看一下: Bus 003 Device 009: ID 1457:5118 First Intern ...

  6. Ubuntu中配置Java环境变量时,出现command not found问题解决记录

    百度出Ubuntu中配置Java环境变量时,在利用sudo gedit /etc/profile 对profile编辑后, 在terminal中输入 sudo source /etc/profile, ...

  7. Star: Ubuntu下配置和编译cpp-ethereum客户端启动GPU加速交易

    Ubuntu下配置和编译cpp-ethereum客户端启动GPU加速交易 Ethereum,中文翻译是"以太坊",是一个公有区块链的开源项目.因为以太坊是基于P2P网络所以没有中心 ...

  8. Ubuntu Linux配置Nginx+MySQL+PHP+phpMyAdmin详细步骤

    博主之前一直用的是apache,随着网站负荷量增高,感觉apache稍微有点力不从心了.随着nginx越来越流行,而且其功能强大,博主准备采用nginx作为自己的服务器啦. 每当到了环境配置的时候,博 ...

  9. ubuntu下配置bind9为局域网的DNS服务器

    一.配置bind9服务器之前,先了解这些知识点: 1.DNS解析过程详解:http://www.cnblogs.com/liyuanhong/articles/7353974.html 2.常用域名记 ...

最新文章

  1. train_test_split()用法
  2. 浏览器执行Python脚本
  3. android或java timer声明
  4. 京东SSO单点登陆实现分析
  5. Java黑皮书课后题第7章:7.15(消除重复)使用下面的方法头编写方法,消除数组中重复出现的值。编写一个测试程序,读取10个数,调用该方法,并显示以一个空格分隔的不同数字
  6. 第三次学JAVA再学不好就吃翔(part43)--局部内部类访问局部变量
  7. 树莓派外设开发之接入语音模块
  8. idf实验室--简单编程字符统计
  9. HiveQL:模式设计
  10. 如何实现基于Electron的截图识字App(一)
  11. 单点登录 Oauth2认证 详解
  12. 2022年API接口零代码、低代码、纯代码开发的框架推荐
  13. 上传图片时出现http 415错误
  14. LVGL8学习之msgbox
  15. 想做IT行业项目管理,面向客户方向的,考ITIL和PMP哪个更好一些?
  16. 【嵌入式技术期末复习要点】
  17. 后端——》Java程序推送微信订阅消息
  18. 手机市场变天:荣耀鸣枪,重回舞台中央?
  19. STM32L0系列之【EEPROM读写】
  20. Linux环境:Zookeeper:Error contacting service. It is probably not running

热门文章

  1. UIAlertView, UIAlertViewController
  2. MemSQL 1.8 发布,号称最快的关系数据库
  3. JqGrid3.6最终版本今天发布了
  4. canny算子_Canny边缘检测算法
  5. Jenkins Kubernetes 如何协同工作
  6. Hive 之 用户自定义函数 UDF UDAF UDTF
  7. (96)FPGA面试题-Verilog设计半加器
  8. (13)Verilog程序结构-基本语法(一)(第3天)
  9. System verilog随机系统函数$random使用方法
  10. nodejs从服务器返回静态文件,nodejs静态资源服务器