Apache2¿Í Tomcat5 ¿¬µ¿Çϱâ
Apache2¿Í Tomcat5 ¿¬µ¿Çϱâ
1. Apache 2.0 ¶http://httpd.apache.org ¿¡¼ httpd-2.0.49.tar.gz ¹Þ¾Æ¼ Ǭ´Ù.
$ tar xvfz httpd-2.0.49.tar.gz INSTALL ÆÄÀÏÀ» Âü°íÇÏ¿© apache¸¦ ¼³Ä¡ÇÏ°í ½ÇÇàÇÑ´Ù.
$ ./configure --prefix=PREFIX $ make $ make install $ PREFIX/bin/apachectl start ¿©±â¼ PREFIX´Â apache°¡ ¼³Ä¡µÉ µð·ºÅ丮ÀÌ´Ù. --prefix=PREFIX¸¦ »ý·«Çϸé /usr/local/apache2¿¡ ¼³Ä¡µÈ´Ù.
ÀÌÇÏÀÇ ¼³¸í¿¡¼ PREFIX´Â ¾ÆÆÄÄ¡°¡ ¼³Ä¡µÈ µð·ºÅ丮¸¦ ¶æÇÑ´Ù.
ºê¶ó¿ìÀú¸¦ ¿°í http://127.0.0.1/À» ÀÔ·ÂÇÏ¿´À» ¶§, apache web server°¡ ¼³Ä¡µÇ¾ú´Ù´Â ¸Þ½ÃÁö°¡ ³ª¿À¸é ¼º°ø.
¾ÆÆÄÄ¡ ¼¹ö¸¦ ³¡³»·Á¸é
$ PREFIX/bin/apachectl stop 2. J2SE ¶http://java.sun.com¿¡¼ J2SE 1.4.2 ¸¦ ¹Þ¾Æ ¼³Ä¡ÇÑ´Ù. SDK¸¦ ¹Þ¾Æ¾ß µÈ´Ù. JRE¸¸ ¹ÞÀ¸¸é ¾È µÊ.
È®ÀåÀÚ°¡ binÀε¥ ½ÇÇà±ÇÇÑÀ» ÁÖ°í ½ÇÇà½ÃÅ°¸é license¿¡ µ¿ÀÇÇÏ´ÂÁö¸¦ ¹¯°í ÀÌ¿¡ ´ëÇÏ¿© y¸¦ ´·¯ ´ë´äÇÏ¸é ¼³Ä¡°¡ µÈ´Ù.
¾Æ·¡¿Í °°ÀÌ ½Éº¼¸¯ ¸µÅ©¸¦ ÇÑ´Ù.
$ ln -s /usr/java/j2sdk1.4.2_04 /usr/local/java /etc/profile.d/java.sh¸¦ ¾Æ·¡ÀÇ ³»¿ëÀ¸·Î ¸¸µé¾î ³Ö´Â´Ù. (½ÇÇà Æ۹̼ÇÀ¸·Î ³Ö¾î¾ß ÇÑ´Ù.)
JAVA_HOME=/usr/local/java export JAVA_HOME 3. Tomcat 5 ¶http://jakarta.apache.org¿¡¼ jakarta-tomcat-5.0.19.tar.gz¸¦ ¹Þ¾Æ¼ Ǭ´Ù.
$ tar xvfz jakarta-tomcat-5.0.19.tar.gz RUNNING.txt ÆÄÀÏÀ» Âü°íÇÏ¿© tomcatÀ» ½ÇÇà½ÃŲ´Ù.
$ $CATALINA_HOME/bin/startup.sh¿©±â¼ $CATALINA_HOMEÀº tomcatÀÌ ¼³Ä¡µÈ µð·ºÅ丮ÀÌ´Ù. ¾Æ·¡¿Í °°ÀÌ ½Éº¼¸¯ ¸µÅ©¸¦ ÇÑ´Ù.
$ ln -s /usr/jakarta-tomcat-5.0.19 /usr/local/tomcat ºê¶ó¿ìÀú¸¦ ¿°í http://127.0.0.1:8080/À» ÀÔ·ÂÇÏ¿´À» ¶§, tomcatÀÌ ¼³Ä¡µÇ¾ú´Ù´Â ¸Þ½ÃÁö°¡ ³ª¿À¸é ¼º°ø. tomcatÀ» ³¡³»·Á¸é
$ $CATALINA_HOME/bin/shutdown.sh 4. mod_jk2.so ¶http://jakarta.apache.org ¿¡¼ jakarta-tomcat-connectors-jk2-src-current.tar.gz¸¦ ¹Þ¾Æ¼ Ǭ´Ù.
jk/native2/INSTALL.txt¸¦ Âü°íÇÏ¿© mod_jk2.so¸¦ ¸¸µç´Ù.
$ ./configure --with-apxs2=PREFIX/bin/apxs $ make $ cd ../build/jk2/apache2 $ PREFIX/bin/apxs -n jk2 -i mod_jk2.so 5. httpd.conf ¶À§¿¡¼ ¸¸µç mod_jk2.so¸¦ PREFIX/modules/¿¡ º¹»çÇÑ ´ÙÀ½, PREFIX/conf/httpd.conf ¿¡¼
#LoadModule foo_module modules/mod_foo.so¿Í °°Àº Çü½ÄÀ¸·Î µÇ¾î ÀÖ´Â °÷À» ã¾Æ ±× ¾Æ·¡¿¡ LoadModule jk2_module modules/mod_jk2.so¸¦ Ãß°¡ÇÑ´Ù. DirectoryIndex¸¦ ã¾Æ ±× ÁÙ¿¡ index.jsp¸¦ Ãß°¡ÇÑ´Ù.
Alias /icons/ "/usr/local/apache2/icons/"¿Í °°Àº Çü½ÄÀÇ ÇàÀ» ã¾Æ ±× ¾Æ·¡¿¡ Alias /jsp-examples/ "/usr/local/tomcat/webapps/jsp-examples/" Alias /servlets-examples/ "/usr/local/tomcat/webapps/servlets-examples/"¸¦ Ãß°¡ÇÑ´Ù. DocumentRoot ÇàÀ» ã¾Æ
DocumentRoot "/www"·Î ¹Ù²Ù°í ÀúÀåÇÏ°í ¾Æ·¡¿Í °°ÀÌ ½Éº¼¸¯ ¸µÅ©¸¦ ÇÑ´Ù. $ ln -s /usr/jakarta-tomcat-5.0.19/webapps/ROOT /www 6. workers2.properties ¶PREFIX/conf/¿¡ workers2.properties¸¦ ¾Æ·¡ÀÇ ³»¿ëÀ¸·Î ¸¸µé¾î ÀúÀåÇÑ´Ù. ( jk/native2/INSTALL.txt Âü°í )
[channel.socket:localhost:8009] port=8009 host=127.0.0.1 [ajp13:localhost:8009] channel=channel.socket:localhost:8009 [uri:/*.jsp] worker=ajp13:localhost:8009 [uri:/servlets-examples/*] worker=ajp13:localhost:8009 7. Virtual Host ¶# Virtual HostÀÇ °æ¿ì ¾Æ·¡ URI¿¡¼ È£½ºÆ® ¸íÀ» ³Ö¾î¾ß ÇÏ°í¿ä. server.xml¿¡¼ host¸íÀ» ³ÖÀ¸½Ã¸é µË´Ï´Ù.
[uri:www.kldp.net/*.jsp] worker=ajp13:localhost:8009 [uri:www.kldp.net/servlets-examples/*] worker=ajp13:localhost:8009 [uri:www.kldp.org/*] worker=ajp13:localhost:8009 11. È®ÀÎ ¶ºê¶ó¿ìÀú¿¡¼ http://127.0.0.1À» ÀÔ·ÂÇϸé ÅèĹ ȸéÀÌ ³ª¿Â´Ù. (8080À» ÀÔ·ÂÇÏÁö ¾ÊÀº °ÍÀ» ÁÖ¸ñ)
http://127.0.0.1/jsp-examples/À» ÀÔ·ÂÇÏ¿© ±×°÷¿¡ ÀÖ´Â jsp ¿¹Á¦¸¦ Ŭ¸¯ÇÏ¿© ½ÇÇà°á°ú°¡ ³ªÅ¸³ª¸é jsp ¼º°ø.
http://127.0.0.1/servlets-examples/¸¦ ÀÔ·ÂÇÏ¿© ±×°÷¿¡ ÀÖ´Â servlet ¿¹Á¦¸¦ Ŭ¸¯ÇÏ¿© ½ÇÇà°á°ú°¡ ³ªÅ¸³ª¸é servlet ¼º°ø.
13. ÀÇ°ß ¶apache2¿Í tomcat5¸¦ ¿¬µ¿Çϴµ¥ ¼º°øÇß½À´Ï´Ù. --¼¼¹ú
apache2,tomcat5.. virtual host.. PHP, JSP... ¤Ñ.¤Ñ ½ÇÆÐ..ÀÔ´Ï´Ù. ¤Ñ¤Ñ;; ?¸®³ë
¿¬µ¿ ¼º°øÇß¾î¿ä:-) ?±è´ë±Ù
Fedora core 5 ¿¡¼ jdk 5.0 ¼³Ä¡½Ã¿¡´Â http://www.fedorafaq.org/#java ¸¦ Âü°íÇØÁÖ¼¼¿ä. (Java Installation) --fairypark
Âü°í : Tomcat(Servlet Container)¿Í PHP(Script)¸¦ °°ÀÌ »ç¿ë ÇÏ½Å´Ù¸é ±ÇÀåÇÏÁö ¾Ê½À´Ï´Ù. TomcatÀÌ ¾öû µ¢Ä¡°¡ Å«³ðÀ̶ó¼¿ä. ¼³Á¤Çϱ⠳ª¸§ ÀÌ°Ú½À´Ï´Ù¸¸. RAM 2GÁ¤µµ ÀÏ°æ¿ì Tomcat Instance°¡ 1G±îÁö ¿Ã¶ó °¡´õ±º¿ä. ±×·¸°Ô Æ®·¡ÇÈÀÌ ¸¹Áö ¾ÊÀº °æ¿ì¿¡¿ä. CPU´Â »ç¿ë ÇÏÁö ¾Ê½À´Ï´Ù. ÇÏÁö¸¸ TomcatÀ̳ðÀÌ Á» µ¢Ä¡°¡ Ä¿¼ ¤Ñ¤Ñ. ÇÏÀÚ¸¸ ´À¸°°Ç ¾Æ´Õ´Ï´Ù. ÀÏ¹Ý HTML(Static) ÆäÀÌÁöÀÇ °æ¿ì ApacheÁ¤µµÀÇ ¼º´ÉÀº ³ª¿Â´Ù°í Çϴϱñ¿ä(Tomcat5).
|
You will receive a legacy which will place you above want. |