OpenGrok “hello world"

1) 先安装 tomcat6
aptitude install sun-java6-jdk tomcat6 exuberant-ctags

2)  下载 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 deploy

This 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.

# OPENGROK_TOMCAT_BASE=/path/to/my/tomcat/install ./OpenGrok deploy
我是运行
OPENGROK_TOMCAT_BASE=/usr/share/tomcat6 ./OpenGrok deloy


4)给  opengrok 目录更多的权限
chmod 777 /var/opengrok
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
sudo service tomcat6 start

浏览器,可以试用了
OpenGrok “hello world"_第1张图片

可以参见:
http://hub.opensolaris.org/bin/view/Project+opengrok/installdescription

你可能感兴趣的:(索引)