<< Resion + Apache ¼³Ä¡ >> ÀÛ¼ºÀÚ : ÀåÇüÈ­ (hhjang97@venus.uos.ac.kr) Download Resin : http://www.caucho.com/download/ Apache : http://apache.org #### ¼³Ä¡ÇϱâÀü ¾Ë¾Æ¾ß µÉ°Íµé apache ¼³Ä¡ µð·ºÅ丮´Â /usr/local/resin_apache ·Î °¡Á¤ÇÑ´Ù. apache ¶û resin Àº ¾î¶² ¹öÀüÀ» ¹Þ¾Æµµ »ó°ü ¾ø´Ù. ´Ù¿î¹ÞÀº resin Àº /usr/lcoal/ ¿¡ º¹»çÇÏ°í, ¾ÐÃàÀ» Ǭ´Ù. # cp resin-1.2.0.tar.gz /usr/local/ # cd /usr/local/ # tar -zxvf resin-1.2.0.tar.gz ##################### # ¼³Ä¡ ##################### 1. ¾ÆÆÄÄ¡ ¼³Ä¡ ÀÚ¼¼ÇÑ ³»¿ëÀº ¾ÆÆÄÄ¡ ¼³Ä¡¸¦ Âü°íÇÑ´Ù. ÁÖÀÇ : ¾ÆÆÄÄ¡¸¦ DSO ·Î ¼³Ä¡ÇÏ´ø°¡.. apxs ¸¦ ÀÌ¿ëÇÒ ¼ö ÀÖ°Ô ¼³Ä¡ÇÑ´Ù. # cd apache-1.3.9 # ./configure --prefix=/usr/local/resin_apache --enable-module=all # make;make install 2. Apache ¿¡ module ·Î Ãß°¡Çϱâ JAVA_HOME À» ¼³Á¤ÇØ¾ß ÇÑ´Ù. ´ÙÀ½°ú °°ÀÌ jdk À§Ä¡¸¦ Àû¾îÁØ´Ù. # export JAVA_HOME=/usr/local/jdk 2-1. RPM À¸·Î apache ¸¦ ¼³Ä¡ÇÑ °æ¿ì¿¡´Â apxs ¸¦ ã¾Æ¼­ configure ¿É¼ÇÀ» ÁØ´Ù. # whereis apxs apxs: /usr/sbin/apxs # ./configure --with-apxs=/usr/sbin/apxs # make;make install 2-2. ±×¿Ü¿¡´Â apache ¼³Ä¡ µð·ºÅ丮¸¦ --with-apache ¿É¼Ç¿¡ ÁöÁ¤ÇØ ÁÖ¸é µÈ´Ù. # ./configure --with-apache=/usr/local/resin_apache # make;make install ¼³Ä¡°¡ ¼º°øÇϸé /usr/local/resin_apache/libexec/mod_caucho.so ÆÄÀÏÀÌ ¸¸µé¾î Áø´Ù. 3. mod_caucho.so °¡ ÀÖ´ÂÁö È®ÀÎÇÑ´Ù. (RPM ÀÎ °æ¿ì /usr/lib/apache ) # ls /usr/local/resin_apache/libexec/ 4. ¾ÆÆÄÄ¡ httpd.conf ¿¡¼­ ¾Æ·¡ ¼³Á¤ÀÌ ÀÖ´ÂÁö È®ÀÎÇÑ´Ù. (caucho-status´Â ¼±ÅûçÇ×ÀÌ´Ù.) LoadModule caucho_module libexec/mod_caucho.so AddModule mod_caucho.c CauchoConfigFile /resin1.1/conf/resin.conf SetHandler caucho-status ###########i### # RPM ÀÎ °æ¿ì ############### LoadModule caucho_module /usr/lib/apache/mod_caucho.so AddModule mod_caucho.c CauchoConfigFile /home/pds_php/java/jsp/resin1.2.0/conf/resin.conf ###################################################################### 5-1. resin ½ÃÀÛÇϱâ/ ³¡³»±â resin1.1/bin/srun.sh start resin1.1/bin/srun.sh stop 5-2. resin-2.0.3 resin-2.0.3/bin/httpd.sh start resin-2.0.3/bin/httpd.sh stop 6. ÀÛµ¿È®ÀÎÇϱâ http://localhost/caucho-status ·Î Servlet EngineÀÌ Á¤ÁöµÈ Á¤º¸¸¦ º¼¼ö ÀÖ´Ù. http://localhost/test.jsp ´Â ¾Æ·¡¿Í °°Àº ¸Þ¼¼Áö¸¦ Ãâ·ÂÇÑ´Ù. Cannot connect to Servlet Runner. * Can't contact servlet runner at localhost:6802 (resin + apache¿¡¼­ resionÀº 6802 Æ÷Æ®¸¦ »ç¿ëÇØ¾ß ÇÑ´Ù.) * caucho-status : Handler to display /caucho-status * caucho-request : Handler to connect to srun 7. Resin¿¡¼­ DocumentRoot ¼öÁ¤Çϱâ resionÀÇ conf/resion.conf ÆÄÀÏ ¼öÁ¤Çϱâ... ==================== resinpath/conf/resin.conf ===================== ==================== /resinpath/conf/resin.conf ===================== 8. ¿¹Á¦ ½ÇÇàÇϱâ '/usr/local/resin_apache/htdocs/test.jsp' ¿¡ ¾Æ·¡ Á¤º¸¸¦ ÀÔ·ÂÇÑ´Ù. <%@ page language=javascript %> 2 + 2 = <%= 2 + 2 %> http://localhost/test.jsp ¿¡¼­ ¾Æ·¡¿Í °°ÀÌ ³ª¿À´ÂÁö È®ÀÎÇÑ´Ù. 2 + 2 = 4 9. ÁÖÀÇ »çÇ× resin 2.0.3 ¿¡¼­´Â resin.conf ÆÄÀÏ¿¡ ÇѱÛÀ» »ç¿ëÇÒ ¼ö ¾ø´Ù. ############################ # INSTALL II ########################### À̹®¼­´Â ´Ù¸¥ °÷¿¡¼­ °¡Á®¿Â °ÍÀÔ´Ï´Ù. Áú¹®Àº Q/A°Ô½ÃÆÇ¿¡.. Áú¹®Àº »èÁ¦ÇÕ´Ï´Ù. ¡Ý No, 43 ¡Ý À̸§:ÀÌ¿ë¼® (nugurii@dreamwiz.com) ¡Ý 2000/10/26(¸ñ) 22:46 ¡Ý Á¶È¸: 3821 ȸ Ãʺ¸¸¦ À§ÇÑ linux+resin+apache ¼³Ä¡Çϱâ * jdk ±î´Â ¹ýÀº java.sun.com ¿¡ Àß ³ª¿ÍÀÖ±¸¿ä... * apacheÇÏ°í resin¼³Ä¡ÇÏ´Â ¹ýÀº www.caucho.com¿¡ Àß ³ª¿Í ÀÖ½À´Ï´Ù. ¢Â JDK1.3 (RPM file) ¼³Ä¡Çϱ⠨ç java.sun.com ¿¡¼­ ´Ù¿îÀ» ¹Þ´Â´Ù ( j2sdk-1_3_0-linux-rpm.sh : 25,406,274 bytes) ¨è cmd> sh ./j2sdk-1_3_0-linux-rpm.sh -- license ¿¡ ´ëÇÑ ³»¿ëÀÌ ³ª¿É´Ï´Ù. µ¿ÀÇÇÏ¸é µÇ°ÚÁÒ. ¨é cmd> su -- root ·Î ¹Ù²ß´Ï´Ù. ¨ê cmd> rpm ivh j2sdk-1_3_0-linux-rpm -- ÇÏ¸é ³¡~ ¸¸¾à¿¡ ¡°glibc >= ~¡± ¾î¼±¸ Çϸ鼭 ¾ÈµÇ¸é ivh --force ·Î ÇÏ½Ã¸é µË´Ï´Ù. -- /usr/java/jdk1.3 À̶ó´Â °÷¿¡ ¼³Ä¡°¡ µË´Ï´Ù. ¢Â Apache Web Server ¼³Ä¡ÇÏ±â ¡Ø DSO °¡ Áö¿øµÇ´Â ¹öÀüÀ̾î¾ß ÇÑ´Ù°í resin¿¡ ¾º¿©Àֳ׿ä. ¡Ø 1.3.12°¡ Àß ¾ÈµÇ¸é 1.3.14·Î Çغ¸¼¼¿ä. ¨ç www.apache.kr.netµî¿¡¼­ ´Ù¿îÀ» ¹Þ´Â´Ù. ¨è cmd> tar xvfvz apache_1.3.12.tar.gz -- .tar.Z ÀÏ°æ¿ì ¡°uncompress [file]¡± À» ÇÑ ÈÄ ¡°tar xvf [file]¡± À» ÇÔ ¨é cmd> cd apache_1.3.12 ¨ê cmd> ./configure --prefix=/usr/local/apache --enable-module=so ¨ë cmd> make ¨ì cmd> make install -- ³¡~ /usr/local/apache ¿¡ »ý±é´Ï´Ù. ¨í httpd.conf ÆíÁýÇϱâ (ÇÑ 3°³¸¸ ¹Ù²Ù¸é Àß ½ÇÇàµË´Ï´Ù.) ServerName [´ç½ÅÀÇ È£½ºÆ® ³×ÀÓ, ¾øÀ¸¸é IP] DocumentRoot "[¿øÇÏ´Â µð·ºÅ丮]" ¨î conf ¹®¹ýÁ¡°Ë (bin µð·ºÅ丮¿¡¼­, conf ÆÄÀÏÀÌ Á¦´ë·Î µÇ¾ú³ª È®ÀÎÇÕ´Ï´Ù.) cmd> ./httpd -t ¨ï ½ÇÇàÇϱâ (bin µð·ºÅ丮¿¡¼­) cmd> ./apachectl start -- stop, restart ¸¦ »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù. ¢Â resin Servlet Engine ¼³Ä¡Çϱ⠨ç www.caucho.com ¿¡¼­ ´Ù¿î¹Þ°í ¾ÐÃà Ç®°í resin1.1.x µð·ºÅ丮·Î °©´Ï´Ù. ¨è cmd> ./configure --with-apache=/usr/local/apache ¨é cmd> make ¨ê cmd> make install or m(2-1) cmd> ./configure --with-apxs=/usr/local/apache/bin/apxs (2-2) cmd> make -- ¿©±â±îÁö Çؼ­ ¼º°øÇϸé apacheÀÇ httpd.conf ÆÄÀÏ¿¡ ´ÙÀ½ÀÌ ÀÚµ¿À¸·Î Ãß°¡µË´Ï´Ù. LoadModule caucho_module /usr/local/apache/libexec/mod_caucho.so AddModule mod_caucho.c CauchoConfigFile /home/nuguri/resin1.1.5/conf/resin.conf # Uncomment the following line to debug the connection setup # # SetHandler caucho-status # ¨ë ¾ÆÆÄÄ¡¸¦ Àç½ÇÇàÇÏ°í http://localhost/caucho-status ¸¦ º¾´Ï´Ù. ¹º°¡°¡ ³ª¿À¸é ¼³Ä¡ ¼º°øÇÑ °ÍÀÔ´Ï´Ù.(¾ÆÁ÷ srunÀº ¹Ì½ÇÇà) ¨ì ȯ°æ¼³Á¤ : ´ÙÀ½À» rootÀÇ .bash_profile ¿¡ Ãß°¡ÇÕ´Ï´Ù. JAVA_HOME=/usr/java/jdk1.3 resin_HOME=/usr/local/resin1.1.5 CLASSPATH=$CLASSPATH:.:[resinÀÇ class root] & export ¿¡ JAVA_HOME, resin_HOME º¯¼ö¸¦ Ãß°¡Çϼ¼¿ä ¨í resinÀÇ resin.conf ¼³Á¤ÇÏ±â ¡Ø ¿øÇÏ´Â µð·ºÅ丮·Î ¼¼ÆÃÇϼ¼¿ä ¨î ½ÇÇàÇϱâ resin1.1.5/bin ¿¡¼­ -- cmd> ./srun.sh start (stop,restart) -- ³¡ÀÔ´Ï´Ù¿ä.. ¼ö°íÇϼ̽À´Ï´Ù. ¦¦¦¦¦~ ¡Ý mastergear (mastergear@orgio.net) 11/17[05:51] 210.117.90.186 ¾ð ÄÄÇÁ·¹½º ÇϽñ⠱ÍÂúÀ¸¸é tar zxvf [file] ÀÌ·¸°Ô Çϸé Çѹø¿¡ Ç®¸®ÁÒ ÈåÈå À̸§ ¸ÞÀÏ ³»¿ë Copyright ¨Ï 2000 JSP School Technologies, Inc. All rights reserved Copyright(c) 2000 technote inc