본문 바로가기
Tools

OpenGrok 설치하기

by Jay Son 아기 냥이 해린 짱💖 2020. 5. 4.

brew install tomcat (tomcat 설치, 이미 설치됨)

brew install tomcat

install tomcat

 

brew install ctags (ctags 설치, 이미 설치됨)

brew install ctags

install ctags

export OPENGROK_TOMCAT_BASE=/usr/local/Cellar/tomcat/9.0.31_1/libexec (tomcat 버전 확인 후 자신의 버전에 맞게 입력)

 

최신 버전 다운로드

https://github.com/OpenGrok/OpenGrok/releases 

최신 버전으로 설정하지 않고 1.0 버전으로 설치

https://github.com/oracle/opengrok/releases/tag/1.0

위 경로에서 opengrok-1.0.tar.gz 파일은 다운로드 후 압축 풀기

tar -xvf opengrok-1.0.tar.gz

 압축 풀고 아래 명령어 실행

./OpenGrok deploy

정상 설치 되었을 경우 메시지

json@JSonui-MacPro bin % ./OpenGrok deploy
readlink: illegal option -- f
usage: readlink [-n] [file ...]
Loading the default instance configuration ...
Installing ./../lib/source.war to /usr/local/Cellar/tomcat/9.0.40/libexec/webapps ...

Start your application server (Tomcat),  if it is not already
running, or wait until it loads the just installed web  application.

OpenGrok should be available on <HOST>:<PORT>/source
  where HOST and PORT are configured in Tomcat.

json@JSonui-MacPro bin % 

 

OpenGrok Index 폴더 설정

export OPENGROK_INSTANCE_BASE=/Volumes/DATA/opengrok_index/  (index 파일 생성 경로)

 

소스 검색 할 수 있도록 OpenGrok index 실행

위치 :  /Users/(계정이름)/opengrok-1.0/bin

./OpenGrok index /Volumes/DATA/SVN/ (소스 경로)

 

Index 완료 후 설정후 경로에 index 데이터 생성

 

접속

http://localhost:8080/source/

 

 

OpenGrok 서버 연결 실패히 재시작

/usr/local/Cellar/tomcat/9.0.31_1/bin (tomcat 실행 파일 경로 이동)

./catalina start  (tomcat 실행)

반응형