LoginSignup
0
0

More than 5 years have passed since last update.

repoを使ってCloud9上にサクッとOpenGrokを立てる。

Last updated at Posted at 2018-04-10

自分用めも。

経緯

OpenGrok+Dockerで、使い捨てソース検索エンジンをつくる はDockerで便利〜♪
だったんだけど、Macのストレージが逼迫してしまうので、Cloud9に・・・ってなった結果。

用意するもの

  • Cloud9環境
  • repoのURL (下のcmd例の https://gist.github.com/d7b049db19fb0286d0ace905a608d562.git の部分)

cmd

apt-get update
apt-get install -y ant exuberant-ctags tomcat7 unzip || true
mkdir /tmp/opengrok
wget https://github.com/OpenGrok/OpenGrok/files/467358/opengrok-0.12.1.6.tar.gz.zip -O /tmp/opengrok.tar.gz.zip
wget http://jflex.de/release/jflex-1.6.1.tar.gz -O /tmp/jflex.tar.gz
unzip /tmp/opengrok.tar.gz.zip -d /tmp/
tar xzvf /tmp/opengrok-0.12.1.6.tar.gz -C /tmp/opengrok
tar xzvf /tmp/jflex.tar.gz -C /tmp/opengrok
cp /tmp/opengrok/jflex-1.6.1/lib/jflex-1.6.1.jar /tmp/opengrok/opengrok-0.12.1.6/lib/
cp -Rap /tmp/opengrok/opengrok-0.12.1.6/bin /usr/local/
cp -Rap /tmp/opengrok/opengrok-0.12.1.6/lib /usr/local/
mkdir /var/opengrok
mkdir /var/opengrok/etc
mkdir /var/opengrok/data
mkdir /var/opengrok/src
OpenGrok deploy
/etc/init.d/tomcat7 restart || true
wget https://storage.googleapis.com/git-repo-downloads/repo -O /usr/local/bin/repo
chmod 755 /usr/local/bin/repo
git config --global user.name DockerOpenGrok
git config --global user.email docker.opengrok@example.com
wget https://raw.githubusercontent.com/YusukeIwaki/docker-opengrok-repo/master/update_repo.sh -O /usr/local/bin/update_repo
chmod 755 /usr/local/bin/update_repo
REPO_INIT_URL=https://gist.github.com/d7b049db19fb0286d0ace905a608d562.git update_repo
/etc/init.d/tomcat7 restart

をrootで実行。

注意点

Cloud9ってアクセス制限かけられるとはいえ、わりとみんな見れちゃうので、秘密のソースはおかないように

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0