OpenGrok “hello world"
1) 先安装 tomcat6
aptitude install sun-java6-jdk tomcat6 exuberant-ctags2) 下载 opengrok-0.11.1.tar.gz tar xzf opengrok-0.11.1.tar.gz 解开3) 部署 opengrok 到 tomcat# cd ~/opengrok/opengrok-0.11.1/bin
and run
# ./OpenGrok deployThis command will do some sanity checks and will deploy the source.war in its directory to one of detected web application containers.
Please follow the error message it provides.
If it fails to discover your container, please refer to optional steps on changing web application properties, which has manual steps on how to do this.
Alternatively use OPENGROK_TOMCAT_BASE environment variable, e.g.
4)建立索引
run, if your SRC_ROOT is prepared under /var/opengrok/src
# ./OpenGrok index(在此之前随便写一个 helloworld.c 程序到 /var/opengrok/src)
otherwise (if SRC_ROOT is in different directory) run:
# ./OpenGrok index <absolute_path_to_your_SRC_ROOT>6)启动 tomcat6