Home | Data Center | Contact US | Login

Á¦¸ñ apache2¿¡ tomcat ¼³Ä¡Çϱâ
÷ºÎÆÄÀÏ apache2¿¡ tomcat ¼³Ä¡Çϱâ.pdf ÀÛ¼ºÀÏ 2008-03-27 11:49:44
ÀÛ¼ºÀÚ : ±â¼úÁö¿øºÎ È« Á¾ ¿ì shairin@nextline.net
 
¸®´ª½º ¼­¹ö¿¡¼­ JSP »ç¿ëÀ» Çϱâ À§ÇÑ ¼³Á¤

 
(1) JAVA + JDK ¼³Ä¡

ÀÚ¹Ù ½ºÅ©¸³Æ® ÆÄÀÏ (jsp) À» Çؼ®ÇÏ°í ½ÇÇàÇÏ´Â Æļ­ÀÎ JAVA ÇÁ·Î±×·¥À» ¼­¹ö¿¡ ¼³Ä¡ ÇÕ´Ï´Ù.
 
¨ç Àڹ٠ȨÆäÀÌÁö¿¡ Á¢¼ÓÀ» ÇÏ¿© ¿øÇÏ´Â ¹öÀüÀÇ JAVA¸¦ ´Ù¿î·Îµå ¹Þ¾Æ ftp µîÀÇ ÇÁ·Î±×·¥À» ÀÌ¿ëÇØ ÀÚ½ÅÀÇ ¼­¹ö¿¡ ¾÷·Îµå ÇÕ´Ï´Ù.
 
http://java.sun.com/
 
¨è ssh·Î Á¢¼ÓÀ» ÇÏ¿© /root/ µð·ºÅ丮·Î java_ee_sdk-5_04-linux-ml.bin ÆÄÀÏÀ» ¿Å°Ü³õ°í ÆÄÀÏ¿¡ ½ÇÇà ¼Ó¼ºÀ» ºÎ¿© ÇÕ´Ï´Ù.
 

#chmod +x java_ee_sdk-5_04-linux-ml.bin
 
¨é ½ÇÇà ¼Ó¼ºÀÌ »ý±ä ¼³Ä¡ ÆÄÀÏÀ» ½ÇÇà ÇÕ´Ï´Ù.
 

#./java_ee_sdk-5_04-linux-ml.bin
 

License Agreement [no] {"<" µÚ·Î À̵¿, "!" Á¾·á}? Yes
 

Installation Directory [/opt/SDK] {"<" µÚ·Î À̵¿, "!" Á¾·á}: /usr/local/java


¼±Åÿ¡ ÇØ´çÇÏ´Â ¹øÈ£¸¦ ÀÔ·ÂÇϽʽÿÀ  [1] {"<" µÚ·Î À̵¿, "!" Á¾·á} 1



configuration settings as necessary.
   Admin User [admin] {"<" µÚ·Î À̵¿, "!" Á¾·á}: admin
   Admin User's Password (8 chars minimum):[ÀÓÀÇÀÇ Æнº¿öµå 8ÀÚ¸® ÀÔ·Â]
   Re-enter Password: [ÀÓÀÇÀÇ Æнº¿öµå 8ÀÚ¸® ÀçÀÔ·Â]
   Do you want to store admin user name and password in .asadminpass file in
   user's home directory [yes] {"<" µÚ·Î À̵¿, "!" Á¾·á}? yes
   Admin Port [4848] {"<" µÚ·Î À̵¿, "!" Á¾·á}: 4848
   HTTP Port [8080] {"<" µÚ·Î À̵¿, "!" Á¾·á}: 8080
   HTTPS Port [8181] {"<" µÚ·Î À̵¿, "!" Á¾·á}: 8181
 
Please choose installation options.
 
   Do you want to enable Updatecenter client [yes] {"<" µÚ·Î À̵¿, "!" Á¾·á}? no
   Do you want to upgrade from previous Application Server version [no] {"<" µÚ·Î
   À̵¿, "!" Á¾·á}? No
 

What would you like to do [1] {"<" µÚ·Î À̵¿, "!" Á¾·á}? 1


 
¨ê ¼³Ä¡ ¿Ï·á ÈÄ /etc/profile ¿¡ ´ÙÀ½ÀÇ ³»¿ëÀ» ÀÔ·Â ÇÕ´Ï´Ù.
 
export JAVA_HOME="/usr/local/java/jdk"
export PATH="$PATH:/usr/local/java/bin:/usr/local/java/jdk/bin"
 

# vi /etc/profile
 

 
¨ë source /etc/profile ¸í·É¾î·Î Áï½Ã Àû¿ë ½Ãŵ´Ï´Ù.
 

#source /etc/profile
 
¨ì java –version ¸í·É¾î¸¦ »ç¿ëÇÏ¿© Á¤»óÀûÀ¸·Î ÀÚ¹Ù°¡ ¼³Ä¡ µÇ¾ú´ÂÁö È®ÀÎÇÕ´Ï´Ù.
 

#java –version
 

(2) ÅèĹ ¼³Ä¡

Java ½ºÅ©¸³Æ®¸¦ ½ÇÇàÇÏ¿© À¥ÆäÀÌÁö·Î Ãâ·ÂÇÏ¿© ÁÖ´Â ÅèÄÏÀ» ¼³Ä¡ ÇÕ´Ï´Ù.
 
¨ç tomcat.apache.org »çÀÌÆ®¸¦ ¹æ¹®ÇÏ¿© ¿øÇÏ´Â ¹öÀüÀÇ ÅèĹÀ» ´Ù¿î·Îµå ÇÕ´Ï´Ù.
 

#wget http://apache.tt.co.kr/tomcat/tomcat-6/v6.0.16/bin/apache-tomcat-6.0.16.tar.gz
 
¨è ¾ÐÃàÀ» ÇØÁ¦ ÇÕ´Ï´Ù.
 

# tar zxvf apache-tomcat-6.0.16.tar.gz
 
¨é ÇØÁ¦ÇÑ µð·ºÅ丮¸¦ /usr/local/tomcat À¸·Î À̵¿½Ãŵ´Ï´Ù.
 

# mv apache-tomcat-6.0.16 /usr/local/tomcat
 
¨ê vi ÆíÁý±â ¶Ç´Â ´ÙÀ½ÀÇ ¸í·É¾î¸¦ »ç¿ëÇÏ¿© workers.properties ÆÄÀÏÀ» »ý¼ºÇÕ´Ï´Ù.
 

# cat > /usr/local/tomcat/conf/workers.properties
workers.tomcat_home=/usr/local/tomcat
workers.java_home=/usr/local/java
worker.list=ajp12, ajp13
worker.ajp13.port=8009
worker.ajp13.host=localhost
worker.ajp13.type=ajp13
 
¨ë /etc/profile À» ´ÙÀ½°ú °°ÀÌ ¼öÁ¤ÇÕ´Ï´Ù.
 

export JAVA_HOME="/usr/local/java/jdk"
export CATALINA_HOME="/usr/local/tomcat"
export PATH="$PATH:/usr/local/java/bin:/usr/local/java/jdk
/bin:/usr/local/tomcat/bin"
export CLASSPATH=".:/usr/local/tomcat/common/lib/servlet.j
ar"
 
¨ì source /etc/profile ¸í·É¾î·Î Àû¿ë½ÃŲ ÈÄ /usr/local/tomcat/bin/startup.sh ¸í·É¾î·Î ÅèÄÏÀ» ½ÇÇàÇÕ´Ï´Ù.
 

# source /etc/profile
# /usr/local/tomcat/bin/startup.sh
 
¨í Æ÷Æ®°¡ Á¤»óÀûÀ¸·Î ¿ÀÇ µÇ¾ú´ÂÁö È®ÀÎ ÇÕ´Ï´Ù.
 

# netstat -anp|grep LISTEN
 
(3) ¾ÆÆÄÄ¡¿¡¼­ jsp ¸¦ ¿¬µ¿Çϱâ À§ÇØ mod_jk¸¦ ¼³Ä¡ ÇÕ´Ï´Ù.

¨ç archive.apache.org ÆäÀÌÁö¿¡¼­ ¾Ë¸ÂÀº ¹öÀüÀÇ mod_jk¸¦ ´Ù¿î ¹Þ½À´Ï´Ù.
 

# wget http://archive.apache.org/dist/jakarta/tomcat-connectors/jk/source/jk-1.2.15/jakarta-tomcat-connectors-1.2.15-src.tar.gz
 
¨è apache 2.x °æ¿ì /usr/local/apache/build/libtool ÀÇ ¹öÀü È®ÀÎ 1.5.20 ÀÇ °æ¿ì ¹ö±×¹ß»ý ´ÙÀ½ ¸í·É¾î·Î ¹öÀü È®ÀÎ ÈÄ ½Éº¼¸¯ ¸µÅ©·Î /usr/bin/libtoolÀ» ¿¬°á ÇÕ´Ï´Ù.
 

# /usr/local/apache/build/libtool --version  
# /usr/bin/libtool --version
# rm -rf /usr/local/apache/build/libtool ## 1.5.20 ¹öÀü »èÁ¦
# ln -s /usr/bin/libtool /usr/local/apache/build/libtool  ##½Éº¼¸¯ ¸µÅ©·Î ¿¬°á
 
¨é ´ÙÀ½ÀÇ ¼ø¼­·Î mod_jk¸¦ ¼³Ä¡ÇÕ´Ï´Ù.
 

tar xvfz jakarta-tomcat-connectors-1.2.15-src.tar.gz
 

cd jakarta-tomcat-connectors-1.2.15-src/jk/native
./buildconf.sh
 

./configure --with-apxs=/usr/local/apache/bin/apxs
 

make && make install
 
¨ê ¸ðµâÀÌ Á¤»óÀûÀ¸·Î ¼³Ä¡°¡ µÇ¾ú´ÂÁö ´ÙÀ½ÀÇ ¸í·É¾î¸¦ ÀÔ·ÂÇÏ¿© È®ÀÎ
 

ls -al /usr/local/apache/modules/mod_jk*
(¾ÆÆÄÄ¡ 1.x°æ¿ì ls -al /usr/local/apache/libexec/mod_jk*)
 
¨ë ¸ðµâÀ» httpd.conf ÆÄÀÏ¿¡ µî·ÏÇÕ´Ï´Ù.
 
# vi /usr/local/apache/conf/httpd.conf
 

LoadModule jk_module          modules/mod_jk.so
 
(¾ÆÆÄÄ¡ 1.x °æ¿ì
LoadModule jk_module          libexec/mod_jk.so
AddModule mod_jk.c
)
 
JkWorkersFile /usr/local/tomcat/conf/workers.properties
JkLogFile /usr/local/tomcat/logs/mod_jk.log
JkLogLevel info
 
(4) mysql°ú ¿¬µ¿ÇϱâÀ§ÇØ MySQL_JDBC¸¦ ¼³Ä¡ ÇÕ´Ï´Ù.
 
¨ç http://www.mysql.com/ ȨÆäÀÌÁö¸¦ ¹æ¹®ÇÏ¿© ¾Ë¸ÂÀº mysql_jdbc¸¦ ´Ù¿î ¹ÞÀº ÈÄ ´ÙÀ½ÀÇ ¼ø¼­·Î ¼³Ä¡¸¦ ÇÕ´Ï´Ù.
 

# tar zxvf mysql-connector-java-3.1.14.tar.gz
 

# mv mysql-connector-java-3.1.14 /usr/local/mysql-jdbc
 

# mkdir /usr/local/tomcat/common
# mkdir /usr/local/tomcat/common/lib
# ln -s /usr/local/mysql-jdbc/mysql-connector-java-3.1.14-bin.jar /usr/local/tomcat/common/lib/mysql-connector-java-3.1.14-bin.jar
 
¨è /etc/profileÀ» ÃÖÁ¾ÀûÀ¸·Î ´ÙÀ½°ú °°ÀÌ ¼öÁ¤
 

#JSP »ç¿ëÀ» À§ÇÑ Á¦¹Ý¼³Á¤(ÇϱâÀÇ 4ÁÙ)
export JAVA_HOME="/usr/local/java/jdk"
export CATALINA_HOME="/usr/local/tomcat"
export PATH="$PATH:/usr/local/java/bin:/usr/local/java/jdk
/bin:/usr/local/tomcat/bin"
export CLASSPATH=".:/usr/local/tomcat/common/lib/servlet.j
ar:/usr/local/mysql-jdbc/mysql-connector-java-3.1.14-bin.j
ar"
 
 
  À©µµ¿ì º¸¾ÈÁöħ ¸Þ´º¾ó
  tar¸í·É »ç¿ë¹ý





ȸ»ç¼Ò°³ °³ÀÎÁ¤º¸Ãë±Þ¹æħ ÀÌ¿ë¾à°ü À̸ÞÀÏÁÖ¼Ò ¹«´Ü¼öÁý°ÅºÎ CONTACT US IDC ¾àµµ
ȸ»ç¼Ò°³ °³ÀÎÁ¤º¸Ãë±Þ¹æħ ÀÌ¿ë¾à°ü À̸ÞÀÏÁÖ¼Ò ¹«´Ü¼öÁý°ÅºÎ CONTACT US IDC ¾àµµ ȸ»ç¼Ò°³ °³ÀÎÁ¤º¸Ãë±Þ¹æħ ÀÌ¿ë¾à°ü À̸ÞÀÏÁÖ¼Ò ¹«´Ü¼öÁý°ÅºÎ CONTACT US IDC ¾àµµ