How to install OpenGrok on Windows OS
OpenGrok is a fast and usable source code search and cross reference engine. It helps you search, cross-reference and navigate your source code.
Requirements
-
Create a folder 'C:OpenGrok'
-
Install JDK 1.7 or higher
- Add 'JRE_HOME' environmental variable with value for JRE (eg: C:Program Files (x86)Javajre1.8.0_40)
- Add Java.exe path (eg: C:Program Files (x86)Javajre1.8.0_40bin) in environmental PATH variable and restart computer
-
Download a Ctags from Ctags Windows Binary unzip and place it in C:OpenGrokCtags58 folder
4. Download and install Tomcat. To run Tomcat as a windows service open command prompt and navigate to 'TOMCAT_INSTALLbin' and execute 'service.bat install' command
OpenGork Setup
- Download and unzip Opengork opengrok-0.12.1.tar.gz - Binary distribution to 'C:OpenGrok'
2. Extract the "source.war" file in the "C:OpenGrokopengrok-0.12.1lib"
3. Edit the WEB-INFweb.xml to include
- Path to configuration.xml that is generated (CONFIGURATION )
- Location to the source being indexed. (SRC_ROOT)
- Location to the "Ctag" generated grokData (DATA_ROOT)
https://gist.github.com/nagvbt/8378786674100270279c
4. Copy the the extracted source.war with the modified web.xml to the tomcat webapps folder.
-
Index the source and generate the configuration.xml file using the below command
java -jar C:OpenGrokopengrok-0.12.1libopengrok.jar -W C:OpenGrokopengrok-0.12.1configuration.xml -c C:OpenGrokctags58ctags.exe -P -S -v -s D:Dev -d C:OpenGrokgrokdata
-
Launch Tomcat after the indexing in done. Open http://localhost:8080/source
-
Repeat step-5 tp re-index if you need to add new projects/pick new source etc.