´ÙÀ½ ÀÌÀü Â÷·Ê

3. Tomcat 3.1 ¼³Ä¡

ÇÊÀÚÀÇ Å×½ºÆ®È¯°æÀº ´ÙÀ½°ú °°´Ù

¿©±â¿¡¼­ ¼Ò°³ÇÏ´Â ¼³Ä¡´Â Apache Plugin ÇüÅÂÀÌ´Ù.

3.1 Tomcat 3.1 ¼³Ä¡

1. ¼³Ä¡Àü¿¡ ¾ÆÆÄÄ¡¿ÍÀÇ ¿¬µ¿À» À§ÇØ ¾ÆÆÄÄ¡´Â DSO ·Î ÄÄÆÄÀϵǾî ÀÖ¾î¾ß ÇÑ´Ù.

Apache Configure ¹× ÄÄÆÄÀÏ ¿¹

[root@nogadax src]$ ./configure --prefix=/usr/local/apache \
--enable-module=most \
--enable-shared=max
[root@nogadax src]$ make
[root@nogadax src]$ make install 

2. JDK1.1.x ¹öÁ¯ ÀÌ»óÀÌ ¼³Ä¡µÇ¾î ÀÖ¾î¾ß ÇÑ´Ù.

3. http://jakarta.apache.org/downloads/binindex.html ¿¡¼­ ÀÌ¹Ì ÄÄÆÄÀÏµÈ ¹ÙÀ̳ʸ® ÆÐÅ°Áö(jakarta-tomcat.tar.gz)¸¦ ´Ù¿î¹Þ°í mod_jserv.so ¸¦ ´Ù¿î¹Þ´Â´Ù.

4. Àû´çÇÑ µð·ºÅ丮¿¡ ¹ÙÀ̳ʸ® ÆÐÅ°ÁöÀÇ ¾ÐÃàÀ» Ç®¸é ¼³Ä¡ ¿Ï·áÀÌ´Ù.

3.2 ¼³Á¤Çϱâ

1. ´Ù¿î¹ÞÀº mod_jserv.so ¸¦ (¾ÆÆÄÄ¡ µð·ºÅ丮ÀÇ) apache/libexec µð·ºÅ丮¿¡ º¹»çÇÑ´Ù.

2. TOMCAT_HOME°ú JAVA_HOME ȯ°æº¯¼ö¸¦ ¼³Á¤ÇÑ´Ù.

¸¸¾à tomcat ÀÇ °æ·Î°¡ /usr/local/jakarta-tomcat À̸é /etc/profile µîÀÇ ÆÄÀÏ¿¡ ´ÙÀ½Ã³·³ ¼³Á¤ÇÑ´Ù.

export TOMCAT_HOME=/usr/local/jakarta-tomcat

JAVA_HOME ¶ÇÇÑ ¸¶Âù°¡Áö·Î jdkÀÇ °æ·Î°¡ /usr/local/jdk1.2.2 ÀÌ¸é ´ÙÀ½°ú °°´Ù.

export JAVA_HOME=/usr/local/jdk1.2.2

±×·± ÈÄ ¼³Á¤ È­ÀÏÀ» ½ÇÇàÇÏ¿© º¯¼ö¸¦ ¸Þ¸ð¸®·Î ¿Ã¸®¸é µÈ´Ù.

    (¿¹ : [root@nogadax local]$  .  /etc/profile )

3. tomcat µð·ºÅ丮ÀÇ conf µð·ºÅ丮¿¡ Á¸ÀçÇÏ´Âtomcat.conf ¸¦ ¾Æ·¡Ã³·³ ¾ÆÆÄÄ¡ µð·ºÅ丮 ¹ØÀÇ conf µð·ºÅ丮³»ÀÇ httpd.conf ÆÄÀÏÀÇ Á¦ÀÏ ¸¶Áö¸·¿¡ Ãß°¡ÇÏ¸é µÈ´Ù.

    Include  /usr/local/jakarta-tomcat/conf/tomcat.conf

±×·± ÈÄ tomcat.conf¸¦ ¼öÁ¤ÇÑ´Ù. ¾Æ·¡ÀÇ ¶óÀÎÀ» Ãß°¡ÇÏ¸é µÈ´Ù.(tomcat_test´Â ¿¹Á¦ µð·ºÅ丮ÀÓ)

ApJServMount /tomcat_test /root

tomcat.conf ¼öÁ¤ ÈÄ webapps µð·ºÅ丮¹Ø¿¡ tomcat_test µð·ºÅ丮¸¦ ¸¸µç ÈÄ tomcat_test µð·ºÅ丮¿¡ WEB-INF µð·ºÅ丮¸¦ ¸¸µç´Ù. ±×·± ÈÄ TOMCAT_HOME/conf/web.xmlÀ» »õ·Î ¸¸µç WEB-INF µð·ºÅ丮¿¡ º¹»çÇÑ´Ù.

Âü°í·Î Tomcat 3.1¿¡ Apache1.3.12 ¹öÁ¯À̸é À§ÀÇ ¼³Á¤ ÈÄ TomcatÀ» ½ÇÇàÇϸé ÀÚµ¿À¸·Î tomcat-apache.conf ÆÄÀÏÀÌ »ý¼ºµÈ´Ù. ±×·¯¸é Tomcat Á¾·á ÈÄ tomcat.conf¸¦ ÀûÀýÈ÷ ¹é¾÷ ÈÄ tomcat-apache.conf¸¦ tomcat.conf ·Î rename ÇÏ¿© »ç¿ëÇصµ µÈ´Ù.

3.3 Tomcat 3.1 ½ÇÇàÇϱâ

¸ÕÀú tomcat À» ½ÇÇàÇÑ ÈÄ¿¡ ¾ÆÆÄÄ¡¸¦ ½ÇÇàÇÑ´Ù.

1. tomcat ½ÇÇàÀº tomcat ÀÇ bin µð·ºÅ丮ÀÇ "tomcat.sh start" ³ª "startup.sh" ¸¦ ½ÇÇàÇÑ´Ù.

2. ¾ÆÆÄÄ¡¸¦ ½ÇÇàÇÑ´Ù.(apachectl start)

3.4 Á¾·áÇϱâ

1. tomcatÀ» Á¾·áÇÑ´Ù. ½ÇÇට¿Í ¸¶Âù°¡Áö·Î tomcat ÀÇ bin µð·ºÅ丮ÀÇ "tomcat.sh stop" ³ª "shutdown.sh" ¸¦ ½ÇÇàÇÑ´Ù.

2. ¾ÆÆÄÄ¡¸¦ Á¾·áÇÑ´Ù.(apachectl stop)

3.5 Tomcat 3.1 Å×½ºÆ®Çϱâ

Å×½ºÆ®´Â URL ÀÌ http://210.110.144.235 À϶§¿¡ ´ÙÀ½°ú °°´Ù.

http://210.110.144.235/examples/servlets

http://210.110.144.235/examples/jsp

3.6 Servlet ÄÄÆÄÀÏ

Servlet ÀÇ ÄÄÆÄÀÏÀ» À§ÇØ tomcat µð·ºÅ丮 ¹ØÀÇ lib µð·ºÅ丮ÀÇ "servlet.jar" À» CLASSPATH ¿¡ µî·ÏÇÏ¸é µÈ´Ù. (ÀÌ¿Ü¿¡ ´Ù¸¥ ¹æ¹ýÀÌ ÀÖÀ¸¸é ÀúÀÇ È¨À̳ª ¸ÞÀÏ·Î º¸³»ÁÖ½Ã¸é °í¸¿°Ú½À´Ï´Ù.)

¿¹ : export  CLASSPATH=$CLASSPATH:/usr/local/jakarta-tomcat/lib/servlet.jar

±×·± ÈÄ servlet ÇÁ·Î±×·¥µéÀ» ÄÄÆÄÀÏÇÏ¸é µÈ´Ù.


´ÙÀ½ ÀÌÀü Â÷·Ê