ubuntu install opengrok
总结:
1. 安装jdk和tomcat
2. 安装ctags
3. 解压opengrok.tar.gz包, 然后将source.war复制到tomcat/webapp下面
sudo cp -R opengrok-0.12.1 /usr/opengrok
编辑 opengrok/bin/OpenGrok, 在OPENGROK_TOMCAT_BASE处添加tomcat的路径
sudo ./OpenGrok index /home/carlo/sae/work/carloblog生成索引
在浏览器中运行 http://localhost:8080/opengrok即可

具体:
1. install jdk and tomcat
http://tomcat.apache.org/download-80.cgi
sudo tar zxvf apache-tomcat-7.0.5.tar.gz
sudo mv apache-tomcat-7.05 tomcat7
sudo ./starup.sh
http://localhost:8080
2. download and insatll opengrok
http://opengrok.github.io/OpenGrok/
tar xvzf opengrok-0.11.1.tar.gz
将./lib目录下的source.war包拷贝到/data_2/tools/apache-tomcat-7.0.40/webapps目录下
cp source.war ~/programfiles/tomcat7/webapps/opengrok.war
浏览器中输入: http://localhost:8080/opengrok/, 可看到如下结果

3. ctags的安装和使用
http://blog.csdn.net/g_brightboy/article/details/16830395
功能:为源码的变量/对象、结构体/类、函数/接口、宏等产生索引文件,以便快速定位
安装:
1)在线安装:
sudo apt-get install ctags (ubuntu)
(RedHat系列使用:yum install ctags)
若不成功,可能是因为源的问题,换一下软件源update后重新执行上述命令即可。
2)手动下载安装:
下载地址
Official site: http://ctags.sourceforge.net/
VIM online: http://www.vim.org/scripts/script.php?script_id=610
参考步骤(以5.8版本ctags-5.8.tar.gz为例)
解压后
$ cd ctags-5.8
$ ./configure
$ make
# sudo make install
安装结束后,使用ctags命令测试是否成功
或whatis ctags, whereis ctags等

4. OpenGrok的配置
https://github.com/OpenGrok/OpenGrok/wiki/How-to-install-OpenGrok
(1)编辑 opengrok/bin/OpenGrok, 在OPENGROK_TOMCAT_BASE处添加tomcat的路径
# - OPENGROK_TOMCAT_BASE Base Directory for Tomcat (contains webapps) OPENGROK_TOMCAT_BASE=/home/carloz/programfiles/tomcat7
(2)./OpenGrok deploy
(3)sudo cp -R opengrok-0.12.1 /usr/opengrok
(4)cd /usr/opengrok/bin
改变索引的存放目录, 修改/usr/opengrok/bin/OpenGrok 中:

OPENGROK_INSTANCE_BASE="${OPENGROK_INSTANCE_BASE:-/var/opengrok}"
将 /var/opengrok 改为 自己想要储存的目录;
./OpenGrok index <absolute_path_to_your_SRC_ROOT> 代码的绝对路径
sudo ./OpenGrok index /home/carlo/sae/work/carloblog(code path) 建立源码索引
索引建立完成后 默认在 /var/opengrok/目录下:

(5)http://blog.csdn.net/mickeyfirst/article/details/9044337
opengrok将会自动生成configuration.xml文件
https://github.com/OpenGrok/OpenGrok/wiki/How-to-install-OpenGrok
若是先生成了index,在想转移索引目录,也是可以的,但是比较麻烦
需要修改如下几个文件
carloz@linux:~/programfiles/opengrok$ sudo mv /var/opengrok ./indexdata
carloz@linux:~/programfiles/opengrok/bin$ vi OpenGrok
root@linux:/home/carloz/programfiles/opengrok/indexdata/etc# vi configuration.xml
root@linux:/home/carloz/programfiles/opengrok/indexdata# vi logging.properties
root@linux:/home/carloz/programfiles/tomcat7/webapps/opengrok/WEB-INF# vi web.xml
把这几个文件中的所有 /var/opengrok路径全部改成 自己的路径
You need the following:
- JDK 1.7 or higher
- {OpenGrok binaries from downloads (either the package for Solaris, or .tar.gz with binaries, NOT the src !)
- Exuberant Ctags for analysis
- A servlet container like GlassFish or Tomcat (5.x or later) also running with java at least 1.6
- If history is needed, appropriate binary (in some cases also cvs/svn repository) must be present on the system (e.g. Subversion or Mercurial or SCCS or ... )
- 2GB of memory for indexing process using OpenGrok script (can use less, this is scaled for bigger deployments)
- a recent browser for clients - IE, Firefox, recent Chrome or Safari
ubuntu install opengrok的更多相关文章
- Ubuntu install TensorFlow
/******************************************************************************** * Ubuntu install T ...
- ubuntu install zabbix
ubuntu install zabbix reference1 reference2 some ERRORS raise during install process, may it help. z ...
- Ubuntu install android studio
Ubuntu install android studio 1. 安装 openjdk8,并在配置文件 /etc/profile 中,追加如下内容: sudo aptitude install ope ...
- ubuntu install redis
ubuntu install redis apt-get update apt-get install redis-server redis-server --daemonize yes
- Ubuntu install Docker
首先需要说明的是,根据Docker的官方文档,Docker的安装必须在64位的机子上.这里只说明Ubuntu 14.04与16.04,我成功安装成功过Ubuntu 14.04,16.04还没有测试过, ...
- Ubuntu install g++
We can use two ways to install g++ on Ubuntu. 1. a. sudo apt-get install make gcc g++. b. sud ...
- [Ubuntu] Install teamviewer9 on Ubuntu14.04_x64
The article copied from http://ubuntuhandbook.org/index.php/2013/12/install-teamviewer-ubuntu-1404/ ...
- [Ubuntu] Install subversion1.8 on Ubuntu13.10
Subversion1.8 is difference far away from subversion1.7, here is the steps to install subversion1.8. ...
- Ubuntu Install Chrome Brwoser
在ubuntu下安装chrome浏览器,可以直接从官网下载:http://www.google.cn/intl/zh-CN/chrome/browser/thankyou.html?platform= ...
随机推荐
- Redis教程02——管道(Pipelining)
请求/响应协议和RTT Redis是一个使用客户端/服务器模型(也被称作请求/响应协议)的TCP服务器. 这说明通常来讲一个一个请求的实现有以下步骤: 客户端发送请求到服务器,并从socket中以堵塞 ...
- Codeforces Round #100(140~~)
140 A. New Year Table 题目大意:有一个大圆桌子,半径是R, 然后有n个半径是r的盘子,现在需要把这些盘子摆放在桌子上,并且只能摆放在桌子边缘,但是不能超出桌子的范围....问能放 ...
- 查询grep结果的前后n行
linux系统中,利用grep打印匹配的上下几行 如果在只是想匹配模式的上下几行,grep可以实现. $grep -5 'parttern' inputfile //打印匹配行的前后5行 ...
- cocos2d-x3.0 ListView
.h #include "cocos2d.h" #include "cocos-ext.h" #include "ui/CocosGUI.h" ...
- HDU3336-Count the string(KMP)
Count the string Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) ...
- 有关Transaction not successfully started问题解决的方法
我的项目配置:struts2+hibernate3.3+spring3.2.5 主要问题:在进行更新和提交操作时出现下面异常 org.springframework.transaction.Trans ...
- IIS7 和IIS8.0 HTTP 错误 500.19 - Internal Server Error 问题的解决方式
百度了好久,没找到解决这个问题确切的答案,我也知道肯定是权限的问题,当然,经过一番尝试之后,最终攻克了,解决之道例如以下(个人方法,能够一试): 1.找到你的配置文件所在的目录,我的是 E:\源代码\ ...
- [AngularJS] Default Child state and nav between child state
Let's say we want a parent state which is a abstract state. Two children states, one is for sinlge a ...
- 关于MySQL的各种总结
https://blog.atime.me/note/mysql-summary.html 总结使用MySQL过程中遇到的各种问题和一些有用的资源,配置等等.将之前的若干篇零散的文章汇总到一起,备忘. ...
- Web的鼠标拖动效果
以前写过一个拖动效果的Demo,拖拽元素新位置的计算是放在拖拽元素的mousemove事件中进行的.计算效率差,而且效果不好.所以一直有想怎样才能做出jquery-ui那种顺滑的拖拽效果. 其实顺滑的 ...