基于lxr的源代码浏览系统

基础环境:

CentOS release 6.9 (Final)

perl-5.10.1-144.el6.x86_64
httpd-2.2.15-59.el6.centos.x86_64

mysql-server-5.1.73-8.el6_8.x86_64

 

安装步骤:

  1. yum安装perl-CPAN
  2. 用perldoc perllocal查看 已经安装的模块,如果File::MMagic尚未安装,则需要perl -MCPAN -e 'install File::MMagic'来安装
  3. 下载安装glimpse-4.18.6
  4. 下载lxr-2.2.1压缩包,解压到/usr/local/share/; 配置PATH和PERL5LIB环境变量:

export PATH=.:/usr/local/share/lxr-2.2.1:/usr/local/bin:$PATH
export PERL5LIB=$PERL5LIB:/usr/local/share/lxr-2.2.1/lib:/usr/local/share/lxr-2.2.1/scripts

   5. genxref --checkonly 验证依赖是否齐全

   6. 启动mysql数据库;

   7. cd /usr/local/share/lxr-2.2.1 && ./scripts/configure-lxr.pl && custom.d/initdb.sh; 除了项目源代码的路径,其余的地方一路回车用默认值;该脚本生成数据库和custom.d/lxr.conf; cp custom.d/lxr.conf .

   8. genxref --url='http://<主机名>/lxr'

   9. 生成的custom.d/apache-lxrserver.conf 文件此时尚有问题,需要修改:Alias /lxr "/usr/local/share/lxr-2.2.1"   -->  ScriptAlias /lxr "/usr/local/share/lxr-2.2.1"

 

   10. cp custom.d/apache-lxrserver.conf /etc/httpd/conf.d/ && service httpd restart; 如果有MODPERL2相关指令的报错则注释掉;

 

最后访问http://<主机名>/lxr/source即可

 

转载于:https://www.cnblogs.com/blogzcan/p/8298122.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值