Windows上安装OpenGrok的方法
来源:互联网 发布:爬虫 php 教程 编辑:程序博客网 时间:2024/05/21 17:54
http://lifeisbetter.in/blog/2009/05/11/install-opengrok-on-windows/
Install OpenGrok on Windows
As website of OpenGrok says, its indeed a wicked, fast source browser.
In a much elaborate version:
“OpenGrok is a fast and usable source code search and cross reference engine. It helps you search, cross-reference and navigate your source tree.”
Many a times while doing software developement using open source tools/frameworks we are forced to look into the source code of theirs for various reasons like debugging, learn or just to know “what’s exactly is going on under the hood”…
One of the easiest ways to get linked to these open source codes is by linking the appropriate source jars or folders to our project from within our IDE. But most of the times, it doesn’t quite make sense to load the heavy duty IDE for looking into couple of lines of code. Moreover this makes every individual in the team to have the source links configured in thier own IDE.
OpenGrok gives a centrialized repository for source search for the whole team and the code can be searched and viewed just through a web browser that we have got in the desktop. All that we need to do is install and deploy the OpenGrok software in a light weight application server like tomcat.
Since OpenGrok is developed in Java it is implicitly platform independent and hence can be installed on either Windows or Unix version in no time.
Even though the OpenGrok website gives a detailed version of how to install the software, I thought it would be nice to give a installation procedure which could be quickly refered and easily installed. As many of us are still stuck with Windows and I decided to jot down the steps for installing OpenGrok on windows.
Without wasting much of a time. Lets see how to install OpenGrok on any Windows OS and for a sample I have taken the spring source code to be searched through OpenGrok.
For installing OpenGrok on windows, you need the following software downloaded and installed in your system.
JDK 1.5 or aboveOpengrok-0.7.tar.gz from http://opensolaris.org/os/project/opengrok/Exuberant Ctags binary for Windows ( ec57w32.zip) from http://ctags.sourceforge.net/Apache Tomcat 6 from http://tomcat.apache.org/download-60.cgiand finally to test OpenGrok, download the Spring framework source from http://www.springsource.org/download
Steps:
First install the JDK 1.5 or above that you have downloaded. Assuming the you have installed jdk under C://jdk1.6.
Set the JAVA_HOME for the same as “C:/jdk1.6" and the PATH to the java executables as “C://jdk1.6//bin.
Now extract Opengrok-0.7.tar.gz using unzip tools like 7Zip under your downloaded directory.
Create a folder structure as follows directly under C: drive.
-OpenGrok
– bin
– source
– data
[OpenGrok is the main directory and bin,source,data are sub-directories.]
Extract the Exuberant Ctags binary directly under C:// drive such as “C://ctags57? and add the folder to the Environment Variable’s PATH.
Extract the spring package into the newly created C://OpenGrok//source folder.
Open a command prompt and go to the OpenGrok extracted folder. (C://downloaded//Opengrok-0.7) and ensure that you are in the same directory as where opengrok.jar is located.
From there, run the following java command
java -Xmx1524m -jar opengrok.jar -W “C:/OpenGrok/data/configuration.xml” -P -S -v -s “C:/OpenGrok/source” -d “C:/OpenGrok/data”
(转帖注:此处如果使用Xmx1524m有可能启动不了java虚拟机,可以尝试把内存改小一点,比如1024或者512。)
This command would look up for any source available under the source directory and index all the files for searching and as a result it would create a respective configuration.xml file under the “C:/OpenGrokdata” folder.
At this stage, we have successfully installed OpenGrok and created a search index for our local source repository.
Finally we need to deploy OpenGrok in tomcat so that we could search for the source files through a web browser. To install tomcat and deploy OpenGrok, the following steps needs to be followed:
First extract/install Tomcat6 under your preferred location. For simplicity, I installed it directly under C://Tomcat6
Now copy “C:/downloaded/Opengrok-0.7/lib/source.war” to “C:/Tomcat6/webapps” folder.
Start the tomcat server and you can see the source.war is deployed under webapps.
Stop the tomcat server and edit “C:/Tomcat6/webapps/source/WEB-INF/web.xml” file.
Look for,
<context-param>
<param-name>CONFIGURATION</param-name>
<param-value>/etc/opengrok/data/configuration.xml</param-value>
<description>Full path to the configuration file where OpenGrok can read it’s configuration</description>
</context-param>
change the configuration.xml file’s path to appropriate value. In our case it should beC:\OpenGrok\data\Configuration.xml
Save the changes and close the editor.
Restart the tomcat.
Open a web browser and type http://localhost:8080/soruce
If you see the following screen, it means that you have successfully
- [转]Windows上安装OpenGrok的方法
- Windows上安装OpenGrok的方法
- 如何把 opengrok 安装在 windows上
- ubuntu14上安装opengrok
- OpenGrok 的安装
- 在windows下安装opengrok遇到的一个问题
- Android 線上的opengrok
- OpenGrok的安装及使用
- OpenGrok的安装和使用
- Ubuntu下opengrok的安装
- 在windows7上安装使用opengrok
- Linux和windows下安装OpenGrok
- OpenGrok windows 安装及多项目索引
- 安装OpenGrok
- OpenGrok安装
- Ubuntu下OpenGrok的安装配置
- Ubuntu下OpenGrok的安装配置
- Ubuntu下OpenGrok的安装配置
- FMS3系列(六):使用远程共享对象(SharedObject)实现多人时时在线聊天(Flex | Flash)
- findbugs
- 黑马程序员_JAVA学习日记_JAVAJDK1.5以后高新技术
- vim可视模式,块功能
- 基于J2EE规范的中间件——EJB开发环境搭建
- Windows上安装OpenGrok的方法
- 【30秒】android模拟器获取ROOT权限!!!安卓
- 创业总结-我眼中的世界
- JMS入门(一)--JMS基础
- inArray检查数组中是否存在某个值
- 使用u盘安装Red Hat Enterprise 6.0
- 全国省市数据库
- war、jar包的打包方法,命令行方式和使用jbuilder或者eclipse
- 定义C/C++全局变量/常量几种方法的区别(转)