首先需要安装sun jdk
安装tomcat
1.下载tomcat
wget http://apache.etoak.com/tomcat/tomcat-7/v7.0.33/bin/apache-tomcat-7.0.33.tar.gz
tar zxvf apache-tomcat-x.x.tar.gz
mv apache-tomcat /usr/local/tomcat
2.在/etc/profile添加
export CATALINA_HOME=/usr/local/tomcat
CLASSPATH添加$CATALINA_HOME/common/lib/servlet.jar
PATH添加$CATALINA_HOME/bin:$CATALINA_HOME/lib
3.配置相关在conf/server.xml里面
4.启动
bin/startup.sh
安装opengrok
1.yum install ctags -y
2.下载
wget http://hub.opensolaris.org/bin/download/Project+opengrok/files/opengrok-0.11.1.tar.gz
tar zxvf xxx.tar.gz
mv opengrok-x.x.x /usr/local/opengrok
3.配置
在/usr/local/opengrok创建src目录
mkdir src
找到OPENGROK_INSTANCE_BASE
OPENGROK_INSTANCE_BASE="${OPENGROK_INSTANCE_BASE:-/usr/local/opengrok}"
4.在#/bin/sh下添加
OPENGROK_APP_SERVER="Tomcat"
JAVA_HOME=/usr/java/jdk1.7.0_06
OPENGROK_WAR_TARGET=/usr/local/tomcat/webapps
5.启动
./bin/OpenGrok deploy
./bin/OpenGrok index