ApacheÀÇ ¼³Á¤
ÇöÀç Servlet/JSPÀÇ µµ¾àÀ¸·Î ÀÎÇÏ¿© °¢Á¾ VendorµéÀÌ ³»³õÀº engineµéÀÌ ¸¹´Ù.
¿©±â¼´Â ¸¹Àº ¿£ÁøÁßÀÇ ÇϳªÀÎ resin webserver¸¦ apache¸ðµâ°ú ÇÕÇÏ¿© web
service·Î¼´Â apache¸¦ servlet runner·Î¼´Â resinÀ» ºÙ¿©º¸µµ·Ï ÇÏÀÚ.
¼¼ÆÃȯ°æÀº x86°è¿À» ±âÁØÀ¸·Î¼ ¼³¸íÀ» ÇÏ°Ú´Ù.
À©µµ¿ì ½Ã½ºÅÛÀÇ °æ¿ì, ÀϹÝÀûÀ¸·Î apache¼¹ö¿Í resin¼¹ö ¸ðµÎ ¼³Ä¡°¡ ¸ðµÎ
½±±â ¶§¹®¿¡ ³ªÁß¿¡ ³ª¿À´Â ȯ°æ¼³Á¤¸¸ Á¦´ë·Î µÈ´Ù¸é ¼¼ÆÃÀÌ µÇ¾î ÁöÁö¸¸
´ëºÎºÐÀÇ °æ¿ì linux¸¦ ¾²´Â »óȲÀÌ¶ó º¸¿©Áö¹Ç·Î linux¸¦ ±âº»È¯°æÀ¸·Î ÇÏ¿©
¿©·¯ºÐµé¿¡°Ô ¼³¸íÀ» Çϵµ·Ï ÇÏ°Ú´Ù.
¿ì¼± apacheÀ¥¼¹ö¸¦ ¾Æ·¡ÀÇ »çÀÌÆ®¿¡¼ ´Ù¿î¹Þµµ·Ï ÇÏÀÚ.
http://httpd.apache.org/dist/httpd/
ÇöÀç apache ¹öÁ¯ 1.3.XX°ú MultiThread, MultiProcess¹æ½ÄÀ» ÃëÇÏ´Â
apache2.X±îÁö ³ª¿ÍÀÖ´Â »óÅÂÀÌ´Ù.
ÇØ´ç apache¸¦ tempµð·ºÅ丮·Î ´Ù¿î¹Þ¾Ò´Ù¸é ¾ÐÃàÀ» ÇØÁ¦Çϵµ·Ï ÇÑ´Ù.
# gzip -d apache_1.3.26.tar.gz
# tar xvf apache_1.3.26.tar
ȯ°æ¼³Á¤À» ÇÒ Â÷·ÊÀÌ´Ù.
configure ½ºÅ©¸³Æ®¸¦ »ç¿ëÇÏ¿© ÀνºÅç Áغñ¸¦ ÇÏ°Ô µÇ´Âµ¥ ÇØ´ç optionÀ» ÁÖ¾î
apache source¸¦ ÄÄÆÄÀÏÇϵµ·Ï ÇÏ¿©¾ß ÇÑ´Ù.
* optionÀº help·Î¼ »ìÆ캼¼ö ÀÖ´Ù.
# ./configure --h
¶ó°í Ä¡°Ô µÇ¸é ÇØ´ç µÇ´Â ¿É¼ÇµéÀÌ ³ªÅ¸³ª°Ô µÇ´Âµ¥ ½ÇÁúÀûÀ¸·Î ²À ¼¼ÆÃÇؾß
¿É¼ÇÀº ÇÑ°¡Áö --enable-module=so ¿É¼ÇÀÌ´Ù.
±âº» ¿É¼ÇÀ» ÀÌ¿ëÇÏ¿© apache¸¦ make install ±îÁö ÇÏ¿© º¸ÀÚ.
--prefix=¼³Ä¡µð·ºÅ丮
¿É¼ÇÀ» ÀÌ¿ëÇÏ¿© targetµð·ºÅ丮¸¦ ÁöÁ¤Çϵµ·Ï ÇÑ´Ù.
¸¸¾à ÁöÁ¤µÇÁö ¾Ê¾Ò´Ù¸é ÀÚµ¿À¸·Î /usr/local/apacheµð·ºÅ丮·Î ÀνºÅçÇÏ°Ô µÈ´Ù.
# ./configure --prefix=/javapattern/apache --enable-module=so --enable-module=speling
À§ÀÇ ¸í·ÉÀ» Ä¡°Ô µÇ¸é ÇÁ·ÒÇÁÆ® »ó¿¡ ÇØ´çµÇ´Â makeÆÄÀÏ »ý¼º ¹× soÆÄÀϵéÀ»
httpd.confÆÄÀÏ¿¡ module·Î¼ Ãß°¡½ÃÅ°°Ô µÈ´Ù.
´ÙÀ½ ¸í·ÉÀ¸·Î ³Ñ¾î°¡µµ·Ï ÇÏÀÚ.
# make && make install
À§ÀÇ ³»¿ëÀº ÇØ´ç apache¸¦ ÀνºÅç½ÃÅ°¸ç À̶§ c compiler¸¦ ÇÊ¿ä·Î ÇÑ´Ù.
¸¸¾à binary¸ðµâÀ» ´Ù¿î¹Þ¾Ò´Ù¸é ÇÊ¿äÄ¡ ¾Ê´Ù.
* httpd.confÀÇ ¼¼ÆÃ
ÇØ´ç ȯ°æ¼³Á¤ÆÄÀÏÀÇ ServerNameÀ» ÀÚ½ÅÀÇ µµ¸ÞÀζǴ IP Address¸¦ º¯°æÇÏ¿©
ÁÖµµ·Ï ÇÑ´Ù.
ResinÀÇ ¼³Á¤
resinÀ» ¼³Ä¡ÇÑÈÄ ±¸µ¿½ÃÅ°±â À§Çؼ´Â perlÀÌ ¹Ýµå½Ã ÀÖ¾î¾ß ÇÑ´Ù.
ResinÀ» ¾Æ·¡ÀÇ »çÀÌÆ®·ÎºÎÅÍ ÃֽŹöÁ¯À» ´Ù¿î·Îµå ¹Þµµ·Ï ÇÑ´Ù.
www.caucho.com
´Ù¿î·Îµå ¹ÞÀº ÆÄÀÏÀ» ¼³Ä¡ÇÏ°íÀÚ ÇÏ´Â µð·ºÅ丮·Î º¹»çÇÑ´Ù.
ÇØ´ç ÆÄÀÏÀÇ ¾ÐÃàÀ» Ç®µµ·Ï ÇÑ´Ù.
#[www/javapattern] gzip -d resin-2.1.6.tar.gz
#[www/javapattern] tar xvf resin-2.1.6.tar
¸ðµÎ Ç®¾ú´Ù¸é ´Ù½Ã configure¸¦ ±¸µ¿½ÃÄÑ¾ß Çϴµ¥ À̺κп¡¼ apache¿Í ÇÔ²²
¼¼ÆÃÀÌ µÉ¼ö ÀÖµµ·Ï ȯ°æ¼³Á¤À» ÇØÁÖ¾î¾ß ÇÑ´Ù.
option --> --with-apache=¾ÆÆÄÄ¡°¡ ¼³Ä¡µÇ¾î ÀÖ´Â µð·ºÅ丮
#[www/javapattern] ./configure --with-apache=/javapattern/apache
À§¿Í °°ÀÌ Ä¡°Ô µÇ¸é ÇØ´çµÇ´Â apache¸ðµâÀ» ÀÌ¿ëÇÏ¿© resinÀÇ makeÆÄÀÏÀ»
»ý¼ºÇÑ´Ù.
#[www/javapattern] make && make install
À§¿Í °°ÀÌ ¸í·ÉÇÏ¿© ¿¡·¯°¡ ¹ß»ýÇÏÁö ¾ÊÀ¸¸é ¸ðµÎ Á¤»óÀûÀ¸·Î ¼¼ÆÃµÈ »óÅÂÀÌ´Ù.
ÀÌÁ¦ apache¿Í resinÀÇ confÆÄÀϷμ document root¸¸ ¸ÂÃß¸é µÈ´Ù. »ç½Ç ÀÌ·¸°Ô
¾ÈÇصµ µÇÁö¸¸ µð·ºÅ丮°¡ ¿ÏÀüÈ÷ ´Ù¸£°Ô µÇ¸é ±ÍÂú±â ¶§¹®¿¡...
¿©±â¼´Â apache document root¸¦ resinÂÊÀ¸·Î ²ø¾î¿À´Â ¹æ¹ýÀ¸·Î ¼³¸íÀ» Çϵµ·Ï
ÇÏ°Ú´Ù.
# [APACHE_HOME/conf] vi httpd.conf
¾Æ·¡¿Í °°ÀÌ ¼öÁ¤Çϵµ·Ï ÇÑ´Ù.
# machine always knows itself by this address. If you use Apache strictly for
# local testing and development, you may use 127.0.0.1 as the server name.
#
ServerName www.javapattern.info <-- ServerÀ̸§À» ¼öÁ¤.. µµ¸ÞÀÎÀÌ ¾ø´Ù¸é IP Address
#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "/javapattern/resin-2.1.6/doc" <-- resinÀÇ µð·ºÅ丮·Î doc rootº¯°æ
#
# Each directory to which Apache has access, can be configured with respect
# to which services and features are allowed and/or disabled in that
# directory (and its subdirectories).
#
# First, we configure the "default" to be a very restrictive set of
# permissions.
#
Options FollowSymLinks
AllowOverride None
DirectoryIndex index.xtp index.html index.jsp
ó·³ ¼öÁ¤Çϵµ·Ï ÇÏ¸ç ¾Æ·¡ÂÊÀ¸·Î ¸îÁÙ´õ ³»·Á¿À¸é DocumentRoot°¡ ¹Ù²î¾úÀ» °æ¿ì
¼¼ÆÃÀ» ¹Ù²ãÁÖ´Â ºÎºÐÀÌ Á¸ÀçÇϴµ¥ ¾Æ·¡Ã³·³ document root¿Í °°Àº µð·ºÅ丮·Î
¼³Á¤ÇÏ¿© ÁØ´Ù.
#
# This should be changed to whatever you set DocumentRoot to.
#
ÀÚ. ÀÌÁ¦ ȯ°æ¼³Á¤ÀÌ ³¡³µÀ¸¸ç À¥¼¹ö¿Í Servlet runner¸¸À» ±¸µ¿½ÃÄÑ À¥ºê¶ó¿ìÁ®¸¦
ÀÌ¿ëÇÏ¿© Å×½ºÆ®ÇÒÀϸ¸ ³²¾Ò´Ù
* ApacheÀÇ ±¸µ¿
# [APACHE_HOME/bin] apachectl start
# [RESIN_HOME/bin] ./srun.sh start
À¥ºê¶ó¿ìÁ®ÀÇ ±âµ¿
URLâ¿¡ http://127.0.0.1/index.xtp
À̶ó°í ÀÔ·ÂÇÑÈÄ cauchoÃʱâȸéÀÌ ³ª¿À¸é ¼¼ÆõǾî Áø »óÅÂÀ̸ç Demo ÇÁ·Î±×·¥µéÀ»
µ¹·Áº¸µµ·Ï ÇÑ´Ù.
¼¼ÆÃÇÏ´Â ¹æ¹ýÀº ¸Å¿ì °£´ÜÇÏ´Ù. »ç½Ç º¥´õ¿£ÁøÀÌ Á¦°øÇÏ¿© ÁÖ´Â port 80¼ºñ½º´Â
apache¸¸ÅÀÇ ¼º´ÉÀ» º¸Àå¸øÇϹǷΠÀÌ·±½ÄÀÇ plug-inÀÌ ¸¹ÀÌ ¾²À̹ǷΠÀ¯¿ëÇÏ°Ô
»ç¿ëµÇ¾úÀ¸¸é ÇÏ´Â ¹Ù·¥ÀÌ´Ù.
|