ã¿ã¤ãã«ã®éãï¼ Tomcat ä¸ã§ç¨¼åãã¦ãã GitBucket ã®æ´æ°æé ã®èªåç¨ã¡ã¢ã§ãï¼èªå㯠3.12 ãã 4.5 ã¸ã®æ´æ°ãè¡ãã¾ããï¼ èªåã®ç°å¢ Versions CentOS 7.2 Tomcat 7.0.54 JVM 1.8.0 GitBucket 3.12 Directories GitBucketã® gitbucket.home 㯠/var/lib/gitbucket Tomcatã® CATALINA_HOME 㯠/usr/share/tomcat æé å ã®${gitbucket.home}ã¨ã${CATAILNA_HOME}ã¨ãã¯åã ã®ç°å¢ã«åããã¦é©å®å¤ãã¦ãã ããï¼ æé 1. ããã¯ã¢ãã ã¨ããããæèåæ¢çã«ããã¯ã¢ããããçããªããªãæãã¾ããï¼ãã®æé ã¯é£ã°ãã¦ãããã§ãï¼ $ mkdir -p ~/backup/gitbucket $ su
Tomcatä¸ã®Webã¢ããªã±ã¼ã·ã§ã³ã§MySQLã®JDBCãã©ã¤ãã使ç¨ããã¨ãTomcatåèµ·åæã«ä»¥ä¸ã®ãããªè¦åãåºåããã¾ãã The web application [] appears to have started a thread named [Abandoned connection cleanup thread] but has failed to stop it. This is very likely to create a memory leak. ããã¯MySQLã«ãã°ãã±ãããä¸ãã£ã¦ãã¦ã対å¦æ¹æ³ããã¡ãã«è¨è¼ãããã¾ãã MySQL Bugs: #65909: referenceThread causes memory leak in Tomcat ServletContextListener#contextDestroyed() ã§ã該å½ã®ã¹ã¬ãããæ¢
å人çã«ã¯ããã¾ãTomcatãJavaã¨ãã£ããã®ã好ãã§ã¯ãªãã£ãã®ã ããä»ã®ããã¸ã§ã¯ããTomcatãæ±ã£ã¦ãããããå¿ããªãããã«è¨å®æ¹æ³ã«ã¤ãã¦ãè¨è¿°ãã¦ãããã¨ã«ããã ã¾ãã¯Oracle JDKåã³Tomcatã®ã¤ã³ã¹ãã¼ã«ããã 1.Oracle JDKã®ã¤ã³ã¹ãã¼ã« ã¾ãã¯ãTomcatãã¤ã³ã¹ãã¼ã«ããä¸ã§åæã¨ãªãJDKã®ã¤ã³ã¹ãã¼ã«ãè¡ãã JDKã«ã¯OpenJDKã¨OracleJDKãããããé常æ¥åã§å©ç¨ããå ´åã¯OracleJDKãç¨ããã®ã§ããã¡ããã¤ã³ã¹ãã¼ã«ããã ã¾ãã¯ãOracle社ã®ãã¡ãã®ãã¼ã¸ããOracle JDKããã¦ã³ãã¼ããä»åã¯Oracle JDK 7u75ãç¨ããã ãã¡ã¤ã«ãã¦ã³ãã¼ãå¾ããµã¼ãå´ã§ä»¥ä¸ã®ããã«ã/opt/jdkããã¡ã¤ã«ãä½æããã ï¼å¥ã«ä»»æã®å ´æã§ãããã ãã©ãã¨ããããä½æãããï¼ mkdir /opt/
mod_jkã¨ã¯ãApacheãIISãªã©ã¨Tomcatãé£æºãããçºã®Connectorã§ãã Tomcatã¯åä½ã§Web Serverã¨ãã¦ã®æ©è½ããã£ã¦ãã¾ãããApache httpdç¨ã®(Web Serverã¨ãã¦ã®)ããã©ã¼ãã³ã¹ãå®å ¨æ§ãç´°ããè¨å®ã¯ã§ããªãã¨è¨ããã¦ãã¾ãã ï¼ããã¾ãããç§ã¯ãã¹ããã¦ãã¾ãããï¼ ããã§ãä¸è¬çã«å ¬éãããµã¤ãã§ã¯Web Serverã¨ãã¦ã®æ©è½ãTomcatã«æãããã®ã§ã¯ãªããApache httpdã«æãããJSPã»Servletã®å¦çãTomcatã«è¡ãããã®ãä¸è¬çãªããã§ãã ããã§httpdã¨Tomcatã仲ç«ã¡ããã®ãmod_jkã§ãã ââââââ httpãªã¯ã¨ã¹ãâ â Apache âââââ å¦çãä¾é ¼ ââââââ ï½ ï½mod_jkï½ââââââï½ Tomcat ï½ httpã¬ã¹ãã³ã¹â ï½ ï½ ï½âââââ
è¨å®æ¹æ³ Tomcatã§ã¯ã<Valve>ã¿ã°ã使ç¨ããã¢ã¯ã»ã¹ãã¦ãã端æ«ãIPã¢ãã¬ã¹ããã¹ãåã«ããå¶éãããã¨ãã§ãã¾ãã<Valve>ã¿ã°ã¯<Engine>ã¿ã°ã<Host>ã¿ã°ã<Context>ã¿ã°ã®ãµãè¦ç´ ã¨ãã¦è¨å®ã§ãã¾ãã<Engine>ã¿ã°ã®ãµãè¦ç´ ã¨ãã¦è¨å®ããå ´åã¯ãã®Tomcatã¨ã³ã¸ã³ãã¹ã¦ã«å¯¾ããã¢ã¯ã»ã¹ãå¶éãã¾ãã<Host>ã¿ã°ã®ãµãè¦ç´ ã¨ãã¦è¨å®ããå ´åã¯è¨å®ããä»®æ³ãã¹ãã«å¯¾ããã¢ã¯ã»ã¹ãå¶éãã¾ãã<Context>ã¿ã°ã®ãµãè¦ç´ ã¨ãã¦è¨å®ããå ´åã¯ãè¨å®ããã³ã³ããã¹ãã«å¯¾ããã¢ã¯ã»ã¹ãå¶éãã¾ãã ãã¹ãåã«ããã¢ã¯ã»ã¹ãå¶éããå ´åã¯ã¢ã¯ã»ã¹ãå¶éãããµã¼ããDNSã®éå¼ãåå解決ãè¡ããå¿ è¦ãããã¾ãã ã¢ã¯ã»ã¹ãã£ã«ã¿ãè¡ãJavaã¯ã©ã¹ãæå®ãIPã¢ãã¬ã¹ã«ãããã£ã«ã¿ããå ´åã¯org.apache.catalina.valves.
Tomcatã¯ãåå¨ããªãURLã¸ã®ãªã¯ã¨ã¹ãããã£ãã¨ããèªè¨¼ã«å¤±æããã¨ãããµã¼ãã¬ããã«ã¨ã©ã¼ããã£ãã¨ããªã©ãHTTPã®ã¨ã©ã¼çºçæã«ã¯ä»¥ä¸ã®ãããªã¨ã©ã¼ãã¼ã¸ã表示ãã¾ãã ãããããã®ã¨ã©ã¼ãã¼ã¸ã¯ã»ãã¥ãªãã£çã«åé¡ã¨ãªããã¨ãããã¾ãã使ç¨ãã¦ããTomcatã®ãã¼ã¸ã§ã³ãã¨ã©ã¼ãã¼ã¸ã®ããã¿ã«è¡¨ç¤ºãããããã§ããã¨ã©ã¼ãã¼ã¸ã®è¡¨ç¤ºãããèå¼±æ§ã®ãããã¼ã¸ã§ã³ã使ç¨ãã¦ãããã¨ãç¥ãããæ»æ対象ã«ããã¦ãã¾ãå±éºãããã¾ãããã¡ãããã¡ã³ããã³ã¹ãä¸å ¨ã§ãèå¼±æ§ãçºè¦ããããã³ã«ææ°ãã¼ã¸ã§ã³ã«ã¢ãããã¼ããã¦ããã·ã¹ãã ãªãããã¼ã¸ã§ã³ã表示ããã¦ãåé¡ã¯ããã¾ããããç¾å®ã¯ãªããªããããããªãã§ãããã ãã®ãããªå±éºãé²ãããã«ãã¨ã©ã¼ãã¼ã¸ãèªåã§ç¨æãããã®ã«ç½®ãæããã»ãã¥ãªãã£ã®åä¸ãå³ãã¹ãã§ããTomcatã§ã¯ãApacheã¨åæ§ã«ã¨ã©ã¼ã³ã¼ãã«å¿ãã¦ç¬èª
ã»ãã¥ãªãã£ã®éè¦æ§ãã¾ãã¾ã大ãããªã£ã¦ããæ¨ä»ã ã§ãæ¬æ ¼çãªãã¡ã¤ã¢ã¼ã¦ã©ã¼ã«æ©å¨ãIPSã¯é«ä¾¡ã ãè¨å®äºã ãé¢åã ãããªããªãã«æå ±ï¼æ°ä¼ãï¼ï½ tomcatã§ã³ã³ããã¹ããã¨ã«IPã¢ãã¬ã¹ã§ã¢ã¯ã»ã¹å¶éãããããã¨ãã§ãã¾ãã ãç·¨éãã¡ã¤ã«ã /usr/local/tomcat/conf/Catalina/localhost/hoge.xml ãç·¨éå 容ã <Context docBase="${catalina.home}/webapps/hoge" debug="0"> <Valve className="org.apache.catalina.valves.RemoteAddrValve" allow="xxx.xxx.xxx.xxx, xxx.xxx.xxx.xxx" deny="xxx.xxx.xxx.xxx, xxx.xxx.xxx.xxx"/> <Valve c
CATALINA_HOME/conf/{EngineName}/{hostname}/{WebAppName}.xml CATALINA_HOME/webapps/{WebAppName}/WEB-INF/context.xml WAR ãã¡ã¤ã«å ã® WEB-INF/context.xml è¨å®å 容 Context è¦ç´ ã« Valve è¦ç´ ãä½æ <Context> <Valve className="org.apache.catalina.valves.RemoteAddrValve" allow="127.0.0.1,192.168.*.*" /> </Context> Host ã§ã®IPå¶é
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}