在Ubuntu 上安装OpenGrok浏览Android源码
来源:互联网 发布:单片机pwm调速原理 编辑:程序博客网 时间:2024/06/05 05:17
http://opengrok.github.io/OpenGrok/
OpenGrok is a fastand usable source code search and cross reference engine. It helps you search,cross-reference and navigate your source tree. It can understand variousprogram file formats and version control histories like Mercurial, git, SCCS,RCS, CVS, Subversion, Teamware, ClearCase, Perforce, Monotone and Bazaar. Inother words it lets you grok (profoundly understand) source code and isdeveloped in the open, hence the name OpenGrok. It is written in java.
- Install ctags
If you cannot run ctags command, install it.
apt-getinstall exuberant-ctags
- Install Tomcat
sudoapt-get install tomcat7 tomcat7-docs tomcat7-examples tomcat7-admin
/etc/init.d/tomcat7 restart
sudo vim /etc/tomcat7/tomcat-users.xml // add below change password before </tomcat-users>
<role rolename="manager-gui"/>
<role rolename="admin-gui"/>
<user username="admin" password="root123" roles="manager-gui,admin-gui"/>
sudo /etc/init.d/tomcat7 restart
Directories:
/etc/tomcat7 - Global configurations
/usr/share/tomcat7/ - Program
/etc/tomcat7/Catalina/localhost/ - local Catalina configures
/var/lib/tomcat7/ - tomcat home
/var/lib/tomcat7/webapps - applications
/var/lib/tomcat7/work - dynamic directory, such as dynamic compiled.jsp
Another way:
From http://tomcat.apache.org/ download Tomcat binary package. (apache-tomcat-7.0.42.tar.gz)
cd /opt
tar xvzf apache-tomcat-7.0.42.tar.gz
cd apache-tomcat-7.0.42/bin
./startup.sh (use ./shutdown.sh to stoptomcat)
Visit: http://localhost:8080/
- Install OpenGrok
From http://opengrok.github.io/OpenGrok/ download binaray file (opengrok-0.11.1.tar.gz).
cd /opt
tarxvzf opengrok-0.11.1.tar.gz
ln -s opengrok-0.11.1 opengrok
copy /opt/opengrok/lib/source.war to /var/lib/tomcat6/webapps or /opt/apache-tomcat-7.0.42/webapps/)
Visit http://localhost:8080/source/to confirm OpenGrok is installed OK.
- Configure OpenGrok
add below line to /etc/profile.d/hansel.sh
exportOPENGROK_INSTANCE_BASE=/opt/opengrok
Modify /opt/apache-tomcat-7.0.42/webapps/source/WEB-INF/web.xml, change the path of opengrok.
<context-param>
<param-name>CONFIGURATION</param-name>
<param-value>/opt/opengrok/etc/configuration.xml</param-value>
<description>Full path to theconfiguration file where OpenGrok can read it'sconfiguration</description>
</context-param>
Setup password for using opengrok web page:
add role name to /etc/tomcat7/tomcat-users.xml
<rolerolename="opengrok"/>
<user username="opengrok" password="1234" roles="opengrok"/>
modify /var/lib/tomcat7/webapps/source/WEB-INF/web.xml, add below tothe bottom before "</web-app>":
<security-constraint>
<web-resource-collection>
<web-resource-name>OpenGrokWeb</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>opengrok</role-name>
</auth-constraint>
</security-constraint>
<login-config>
<auth-method>BASIC</auth-method>
<realm-name>OpenGrok</realm-name>
</login-config>
- Create Index of source code
cd /opt/opengrok
mkdir data src
cd src
ln -s <your sourcecode> <project name>
cd ../bin
OPENGROK_VERBOSE=true ./OpenGrok index
chown tomcat7:tomcat7 * -R
- Create symbol link
To avoid OpenGrok complain about not found /var/opengrok/ when doindex using root.
mkdir -p /var/opengrok/etc/
ln -s /opt/opengrok/etc/configuration.xml/var/opengrok/etc/configuration.xml
- Update index automatically
add execute /opt/opengrok/bin/OpenGrok to system crontab.
sudo vim /etc/cron.daily/opengrok
#!/bin/sh
/opt/opengrok/bin/OpenGrokindex
sudo chmod +x /etc/cron.daily/opengrok
- 在Ubuntu 上安装OpenGrok浏览Android源码
- 在Ubuntu 12.04.2 LTS上安装OpenGrok浏览Android源码
- 在Ubuntu 12.04.2 LTS上安装OpenGrok浏览Android源码
- 在Ubuntu 12.04.2 LTS上安装OpenGrok浏览Android源码
- 如何把 opengrok 安装在 windows上
- 在windows7上安装使用opengrok
- Android之Ubuntu下OpenGrok 安装使用
- ubuntu opengrok 安装使用
- ubuntu14上安装opengrok
- 工具使用-Mac上搭建OpenGrok查看Android源码
- 在Ubuntu下搭建OpenGrok
- Ubuntu下OpenGrok安装使用
- Ubuntu下opengrok的安装
- Android 線上的opengrok
- 在ubuntu上,源码编译安装Mplayer
- 在 Ubuntu 上源码安装 Xen
- 在ubuntu 上下载 编译android 源码
- 在ubuntu上下载Android源码
- glib中gobject的创建
- java值传递、引用传递
- qSort()函数详解
- vue学习笔记
- 【OpenCv】QImage 与 cv::Mat 之间的相互转换
- 在Ubuntu 上安装OpenGrok浏览Android源码
- OpenGL(十二) 光源类型 平行光 、 点光源 、 聚光灯 的实现
- Java反射机制详解超链接
- php文件单上传和多上传
- 关于cliptopadding用法(仅限于个人收藏)
- QT中的QInputDialog的小例子
- 欢迎使用CSDN-markdown编辑器
- spring+hibernate出错小结
- 模仿R语言c++ 向量类c 矩阵类matrix等(持续更新 欢迎指点)