{"id":320,"date":"2010-02-23T14:17:14","date_gmt":"2010-02-23T05:17:14","guid":{"rendered":"http:\/\/www.lancard.com\/blog\/?p=320"},"modified":"2025-03-12T11:31:55","modified_gmt":"2025-03-12T02:31:55","slug":"install-opengrok-to-centos5","status":"publish","type":"post","link":"https:\/\/www.lancard.com\/blog\/2010\/02\/23\/install-opengrok-to-centos5\/","title":{"rendered":"OpenGrok\u3092CentOS5\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb"},"content":{"rendered":"<p><a href=\"http:\/\/www.moongift.jp\/2008\/04\/opengrok\/\">MOONGIFT<\/a>\u3055\u3093\u7d4c\u7531\u3067\u77e5\u3063\u305f\u306e\u3067\u3059\u304c\u3001<a href=\"http:\/\/hub.opensolaris.org\/bin\/view\/Project+opengrok\/\">OpenGrok<\/a>\u306fSCM\uff08Subversion\u3001Git\u3001Mercurial\u7b49\uff09\u4e0a\u306e\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3092\u95a2\u6570\u540d\u3001\u5909\u6570\u540d\u305d\u306e\u4ed6\u3067\u691c\u7d22\u3067\u304d\u308b\u30a8\u30f3\u30b8\u30f3\u3067\u3001<a href=\"http:\/\/www.opensource.org\/licenses\/cddl1.php\">CDDL<\/a>\u3067\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u3068\u3057\u3066\u516c\u958b\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u3053\u306e\u691c\u7d22\u30a8\u30f3\u30b8\u30f3\u3092\u4f7f\u7528\u3059\u308b\u72b6\u6cc1\u3068\u3057\u3066\u306f\u3001\u300c\u3053\u306e\u95a2\u6570\u3063\u3066\u3069\u3093\u306a\u4f7f\u3044\u65b9\uff1f\u300d\u3001\u300c\u67d0\u8a00\u8a9e\u306e\u67d0\u95a2\u6570\u306b\u30d0\u30b0\u304c\u3042\u308b\u307f\u305f\u3044\u306a\u3093\u3060\u3051\u3069\u3001\u3046\u3061\u306e\u30b3\u30fc\u30c9\u3067\u4f7f\u3063\u3066\u306a\u304b\u3063\u305f\uff1f\u300d\u3068\u3044\u3063\u305f\u6642\u304c\u8003\u3048\u3089\u308c\u307e\u3059\u3002\u4fbf\u5229\u305d\u3046\u3067\u3057\u305f\u306e\u3067CentOS5\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<h3>OpenGrok\u306e\u52d5\u4f5c\u306b\u5fc5\u8981\u306actags\u3001tomcat\u7b49\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h3>\n<pre lang=\"bash\">\nyum install ctags tomcat5 tomcat5-webapps\nchkconfig tomcat5 on\n<\/pre>\n<h3>OpenGrok\u7528\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u4f5c\u6210<\/h3>\n<pre lang=\"bash\">\nmkdir \/var\/opengrok\/\nmkdir \/var\/opengrok\/bin\nmkdir \/var\/opengrok\/src #\u3053\u3053\u306b\u89e3\u6790\u5bfe\u8c61\u306e\u30bd\u30fc\u30b9\u3092\u7f6e\u304f\u3053\u3068\u306b\nmkdir \/var\/opengrok\/data\nmkdir \/var\/opengrok\/etc\n<\/pre>\n<h3>OpenGrok\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u30fb\u5c55\u958b<\/h3>\n<pre lang=\"bash\">\nmkdir work\ncd work\nwget\ntar xzvf opengrok-0.9-rc1.tar.gz\nmv opengrok-0.9-rc1\/* \/var\/opengrok\/\n<\/pre>\n<h3>source.war\u3092\u4e00\u5ea6\u5c55\u958b\u3057\u3001web.xml\u3092\u7de8\u96c6\u3059\u308b<\/h3>\n<pre lang=\"bash\">\nmkdir source\ncd source\nunzip \/var\/opengrok\/lib\/source.war\nvi WEB-INF\/web.xml\n<\/pre>\n<pre lang=\"xml\" line=\"1\">\n#\u4e0b\u8a18\u3092\u8ffd\u52a0\n<web-app>\n  ...\n  <context-param>\n    <param-name>DATA_ROOT<\/param-name>\n    <param-value>\/var\/opengrok\/data<\/param-value>\n    <description>REQUIRED: Full path of the directory where data files generated by OpenGrok are stored<\/description>\n  <\/context-param>\n\n  <context-param>\n    <param-name>SRC_ROOT<\/param-name>\n    <param-value>\/var\/opengrok\/src<\/param-value>\n    <description>REQUIRED: Full path to source tree<\/description>\n  <\/context-param>\n\n  <context-param>\n    <param-name>SCAN_REPOS<\/param-name>\n    <param-value>false<\/param-value>\n    <description>Set this variable to true if you would like the web application to scan for external repositories (Mercurial)<\/description>\n   <\/context-param>\n   ...\n<\/web-app>\n<\/pre>\n<pre lang=\"bash\">\nzip -r source.war .\/\nmv source.war \/var\/opengrok\/lib\/\ncp \/var\/opengrok\/lib\/source.war \/var\/lib\/tomcat5\/webapps\/\n<\/pre>\n<h3>\u4f55\u304b\u30bd\u30fc\u30b9\u3092\u53d6\u5f97\u3057\u3066\u304a\u304f<\/h3>\n<pre lang=\"bash\">\ncd \/var\/opengrok\/src\nsvn co file:\/\/\/home\/svn\/project #\u4f55\u304b\u30c1\u30a7\u30c3\u30af\u30a2\u30a6\u30c8\u3057\u3066\u307f\u308b\n<\/pre>\n<h3>\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u4f5c\u6210\u7528\u30b9\u30af\u30ea\u30d7\u30c8\u306e\u7de8\u96c6<\/h3>\n<pre lang=\"bash\">\nvi \/var\/opengrok\/doc\/run.sh\n<\/pre>\n<pre lang=\"bash\" line=\"1\">\n#!\/bin\/sh\n\n#\u5909\u66f4\nPROGDIR=\/var\/opengrok\n\n# REQUIRED The root of your source tree\n#\u5909\u66f4\nSRC_ROOT=${PROGDIR}\/src\n\n# REQUIRED  The directory where the data files like\n# Lucene index and hypertext cross-references are stored\n#\u5909\u66f4\nDATA_ROOT=${PROGDIR}\/data\n\n# OPTIONAL A tab separated files that contains small\n# descriptions for paths in the source tree\nPATH_DESC=${PROGDIR}\/doc\/paths.tsv\n\n# A modern Exubrant Ctags program\n# from http:\/\/ctags.sf.net\n#\u5909\u66f4\nEXUB_CTAGS=\/usr\/bin\/ctags\n\n# If you need to set properties (Ex. override the mercurial binary)\n#PROPERTIES=-Dorg.opensolaris.opengrok.history.Mercurial=\/home\/trond\/bin\/hg\n\n# Uncomment the following line if your source contains Mercurial repositories.\n# SCAN_FOR_REPOS=\"-S\"\n\n# You might want to add more available memory, and perhaps use a server jvm?\n#JAVA_OPTS=\"-server -Xmx1024m\"\n\nLOGGER=\"-Djava.util.logging.config.file=logging.properties\"\n\n#\u5909\u66f4\njava ${JAVA_OPTS} ${PROPERTIES} ${LOGGER} -jar ${PROGDIR}\/lib\/opengrok.jar ${SCAN_FOR_REPOS} -c ${EXUB_CTAGS} -W ${PROGDIR}\/etc\/configuration.xml -P -S -v -s ${SRC_ROOT} -d ${DATA_ROOT}\n\n# OPTIONAL\njava ${LOGGER} -classpath ${PROGDIR}\/lib\/opengrok.jar org.opensolaris.opengrok.web.EftarFile ${PATH_DESC} ${DATA_ROOT}\/index\/dtags.eftar\n<\/pre>\n<pre lang=\"bash\">\nchmod +x \/var\/opengrok\/doc\/run.sh\n<\/pre>\n<h3>\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u4f5c\u6210\u30b9\u30af\u30ea\u30d7\u30c8\u306e\u5b9f\u884c<\/h3>\n<pre lang=\"bash\">\n\/var\/opengrok\/doc\/run.sh #\u3053\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u3092cron\u7b49\u3067\u5b9a\u671f\u5b9f\u884c\u3059\u308b\n<\/pre>\n<h3>Tomcat\u306e\u8d77\u52d5<\/h3>\n<pre lang=\"bash\">\n\/etc\/rc.d\/init.d\/tomcat5 start\n<\/pre>\n<p>http:\/\/hostname:8080\/source\/ \u306b\u30a2\u30af\u30bb\u30b9\u3057\u78ba\u8a8d<\/p>\n<a class=\"synved-social-button synved-social-button-share synved-social-size-24 synved-social-resolution-single synved-social-provider-facebook nolightbox\" data-provider=\"facebook\" target=\"_blank\" rel=\"nofollow\" title=\"Share on Facebook\" href=\"https:\/\/www.facebook.com\/sharer.php?u=https%3A%2F%2Fwww.lancard.com%2Fblog%2Fwp-json%2Fwp%2Fv2%2Fposts%2F320&#038;t=OpenGrok%E3%82%92CentOS5%E3%81%AB%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB&#038;s=100&#038;p&#091;url&#093;=https%3A%2F%2Fwww.lancard.com%2Fblog%2Fwp-json%2Fwp%2Fv2%2Fposts%2F320&#038;p&#091;images&#093;&#091;0&#093;=&#038;p&#091;title&#093;=OpenGrok%E3%82%92CentOS5%E3%81%AB%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB\" style=\"font-size: 0px;width:24px;height:24px;margin:0;margin-bottom:5px;margin-right:5px\"><img loading=\"lazy\" decoding=\"async\" alt=\"Facebook\" title=\"Share on Facebook\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"24\" height=\"24\" style=\"display: inline;width:24px;height:24px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"https:\/\/www.lancard.com\/blog\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/48x48\/facebook.png\" \/><\/a><a class=\"synved-social-button synved-social-button-share synved-social-size-24 synved-social-resolution-single synved-social-provider-twitter nolightbox\" data-provider=\"twitter\" target=\"_blank\" rel=\"nofollow\" title=\"Share on Twitter\" href=\"http:\/\/twitter.com\/share?url=https%3A%2F%2Fwww.lancard.com%2Fblog%2Fwp-json%2Fwp%2Fv2%2Fposts%2F320&#038;text=OpenGrok%E3%82%92CentOS5%E3%81%AB%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB\" style=\"font-size: 0px;width:24px;height:24px;margin:0;margin-bottom:5px;margin-right:5px\"><img loading=\"lazy\" decoding=\"async\" alt=\"twitter\" title=\"Share on Twitter\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"24\" height=\"24\" style=\"display: inline;width:24px;height:24px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"https:\/\/www.lancard.com\/blog\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/48x48\/twitter.png\" \/><\/a><a class=\"synved-social-button synved-social-button-share synved-social-size-24 synved-social-resolution-single synved-social-provider-linkedin nolightbox\" data-provider=\"linkedin\" target=\"_blank\" rel=\"nofollow\" title=\"Share on Linkedin\" href=\"https:\/\/www.linkedin.com\/shareArticle?mini=true&#038;url=https%3A%2F%2Fwww.lancard.com%2Fblog%2Fwp-json%2Fwp%2Fv2%2Fposts%2F320&#038;title=OpenGrok%E3%82%92CentOS5%E3%81%AB%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB\" style=\"font-size: 0px;width:24px;height:24px;margin:0;margin-bottom:5px;margin-right:5px\"><img loading=\"lazy\" decoding=\"async\" alt=\"linkedin\" title=\"Share on Linkedin\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"24\" height=\"24\" style=\"display: inline;width:24px;height:24px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"https:\/\/www.lancard.com\/blog\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/48x48\/linkedin.png\" \/><\/a><a class=\"synved-social-button synved-social-button-share synved-social-size-24 synved-social-resolution-single synved-social-provider-tumblr nolightbox\" data-provider=\"tumblr\" target=\"_blank\" rel=\"nofollow\" title=\"Share on tumblr\" href=\"https:\/\/tumblr.com\/share?s=&#038;v=3&#038;t=OpenGrok%E3%82%92CentOS5%E3%81%AB%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB&#038;u=https%3A%2F%2Fwww.lancard.com%2Fblog%2Fwp-json%2Fwp%2Fv2%2Fposts%2F320\" style=\"font-size: 0px;width:24px;height:24px;margin:0;margin-bottom:5px;margin-right:5px\"><img loading=\"lazy\" decoding=\"async\" alt=\"tumblr\" title=\"Share on tumblr\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"24\" height=\"24\" style=\"display: inline;width:24px;height:24px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"https:\/\/www.lancard.com\/blog\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/48x48\/tumblr.png\" \/><\/a><a class=\"synved-social-button synved-social-button-share synved-social-size-24 synved-social-resolution-single synved-social-provider-mail nolightbox\" data-provider=\"mail\" rel=\"nofollow\" title=\"Share by email\" href=\"mailto:?subject=OpenGrok%E3%82%92CentOS5%E3%81%AB%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB&#038;body=%E3%82%B7%E3%82%A7%E3%82%A2%E3%81%99%E3%82%8B%EF%BC%9A:%20https%3A%2F%2Fwww.lancard.com%2Fblog%2Fwp-json%2Fwp%2Fv2%2Fposts%2F320\" style=\"font-size: 0px;width:24px;height:24px;margin:0;margin-bottom:5px\"><img loading=\"lazy\" decoding=\"async\" alt=\"mail\" title=\"Share by email\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"24\" height=\"24\" style=\"display: inline;width:24px;height:24px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"https:\/\/www.lancard.com\/blog\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/48x48\/mail.png\" \/><\/a>","protected":false},"excerpt":{"rendered":"<p>MOONGIFT\u3055\u3093\u7d4c\u7531\u3067\u77e5\u3063\u305f\u306e\u3067\u3059\u304c\u3001OpenGrok\u306fSCM\uff08Subversion\u3001Git\u3001Mercurial\u7b49\uff09\u4e0a\u306e\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3092\u95a2\u6570\u540d\u3001\u5909\u6570\u540d\u305d\u306e\u4ed6\u3067\u691c\u7d22\u3067\u304d\u308b\u30a8\u30f3\u30b8\u30f3\u3067\u3001CDDL\u3067\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u3068\u3057\u3066\u516c\u958b\u3055\u308c [&hellip;]<\/p>\n","protected":false},"author":11,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[28,29],"class_list":["post-320","post","type-post","status-publish","format-standard","hentry","category-1","tag-opengrok","tag-scm"],"_links":{"self":[{"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/posts\/320","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/users\/11"}],"replies":[{"embeddable":true,"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/comments?post=320"}],"version-history":[{"count":20,"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/posts\/320\/revisions"}],"predecessor-version":[{"id":4737,"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/posts\/320\/revisions\/4737"}],"wp:attachment":[{"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/media?parent=320"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/categories?post=320"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/tags?post=320"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}