Environment Prepare
-
Install Tomcat
- Download from http://tomcat.apache.org/.
- Decompress it to ”D:\apache-tomcat-9.0.46“.
- Add new environment variable “CATALINA_HOME”, value is ”D:\apache-tomcat-9.0.46“.
-
Install JDK
-
Download from https://www.oracle.com/java/technologies/downloads/#java8.
-
Install to “D:\Program Files\Java\jdk1.8.0_201”.
-
Add “D:\Program Files\Java\jdk1.8.0_201\bin” to environment variable “PATH”.
-
Check version
$ java -version java version "1.8.0_201" Java(TM) SE Runtime Environment (build 1.8.0_201-b09) Java HotSpot(TM) 64-Bit Server VM (build 25.201-b09, mixed mode)
-
-
Install ctags
-
Download from http://ctags.sourceforge.net/.
-
Decompress it to “D:\ctags58”.
-
Add “D:\ctags58” to environment variable “PATH”.
-
Install opengrok
- Download from https://github.com/oracle/opengrok/releases.
- Decompress it to “D:\opengrok-1.7.21”.
Config Opengrok
-
Create “data” and “src” directory in “D:\opengrok-1.7.21”.
-
Add code to “src”.
-
Run the command as follows:
java -Xmx524m -jar "D:\opengrok-1.7.21\lib\opengrok.jar" -W "D:\opengrok-1.7.21\data\configuration.xml" -P -S -v -s "D:\opengrok-1.7.21\src" -d "D:\opengrok-1.7.21\data"
-
copy “D:\opengrok-1.7.21\lib\source.war” to “D:\apache-tomcat-9.0.46\webapps\”.
-
modify the file “D:\apache-tomcat-9.0.46\webapps\source\WEB-INF\web.xml”
<param-value>D:\opengrok-1.7.21\data\configuration.xml</param-value>
-
Run http://localhost:8080/source