欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

How to install OpenGrok in ubuntu 14?

程序员文章站 2022-07-12 11:22:36
...

Android OpenGrok:
http://androidxref.com/

How to install OpenGrok?
Download it from http://opengrok.github.io/OpenGrok/
and decompression to /opt/opengrok

Requirements:

  • Latest Java 1.8
  • A servlet container like GlassFish or Tomcat (8.x or later) also running with Java at least 1.8
  • Exuberant Ctags

download jdk 1.8 and decompression to /usr/lib/jvm/jdk1.8.0_131
download tomcat9 and decompression to /var/lib/tomcat9
use startup.sh to start tomcat, see the result by http://localhost:8080

set environment variables as follows:

export JAVA_HOME="/usr/lib/jvm/jdk1.8.0_131"
export JRE_HOME=$JAVA_HOME/jre
export CLASSPATH=.:$CLASSPATH:$JAVA_HOME/lib:$JAVA_HOME/jre/lib
export PATH=$PATH:$JAVA_HOME/bin:$JAVA_HOME/jre/bin

export OPENGROK_INSTANCE_BASE=/opt/opengrok
export SCRIPT_DIRECTORY=$OPENGROK_INSTANCE_BASE/bin
export PATH=$PATH:$SCRIPT_DIRECTORY
export OPENGROK_DISTRIBUTION_BASE=$OPENGROK_INSTANCE_BASE/lib

export SRC_ROOT=/home/ds/project/opengrok
export DATA_ROOT=$OPENGROK_INSTANCE_BASE/data

export EXUB_CTAGS=/usr/bin/ctags

export OPENGROK_APP_SERVER=Tomcat
export OPENGROK_TOMCAT_BASE=/var/lib/tomcat9
export OPENGROK_WAR_TARGET_TOMCAT=$OPENGROK_TOMCAT_BASE/webapps
export OPENGROK_WAR_TARGET=$OPENGROK_TOMCAT_BASE/webapps
export CATALINA_HOME=$OPENGROK_TOMCAT_BASE

Follow instructions as follows:
OpenGrok deploy
OpenGrok index /home/ds/project/opengrok
see the result by http://localhost:8080/source/

需要注意的是版本要匹配!