{"id":124,"date":"2016-10-26T15:21:10","date_gmt":"2016-10-26T06:21:10","guid":{"rendered":"http:\/\/jook.pe.kr\/?p=124"},"modified":"2016-10-26T15:21:10","modified_gmt":"2016-10-26T06:21:10","slug":"resin-apache-%ec%97%b0%eb%8f%99%ed%95%b4%ec%84%9c-%ec%84%a4%ec%b9%98%ed%95%98%ea%b8%b0","status":"publish","type":"post","link":"http:\/\/jook.pe.kr\/?p=124","title":{"rendered":"resin + apache \uc5f0\ub3d9\ud574\uc11c \uc124\uce58\ud558\uae30"},"content":{"rendered":"<p>mysql + apache + jdk + resin + php + Zend \uc124\uce58<br \/>\nphp\uc640 jsp \uac19\uc774 \uc0ac\uc6a9\ud558\uae30<\/p>\n<p>1. source \ud30c\uc77c \ub2e4\uc6b4\ub85c\ub4dc<\/p>\n<p>\uc124\uce58\uc5d0 \ud544\uc694\ud55c \ud30c\uc77c\uc744 \/usr\/local\/src \ub514\ub809\ud1a0\ub9ac\uc5d0\uc11c \ub2e4\uc6b4\ub85c\ub4dc \ud558\uace0 \uc555\ucd95 \ud574\uc81c \ud55c\ub2e4.<br \/>\napache -&gt; <a href=\"http:\/\/apache.org\/\">http:\/\/apache.org\/<\/a><br \/>\nmysql -&gt; <a href=\"http:\/\/mysql.com\/\">http:\/\/mysql.com\/<\/a><br \/>\nphp -&gt; <a href=\"http:\/\/php.net\/\">http:\/\/php.net\/<\/a><br \/>\nZendOptimizer -&gt; <a href=\"http:\/\/zend.org\/\">http:\/\/zend.org\/<\/a><br \/>\njkd -&gt; <a href=\"http:\/\/java.sun.com\/\">http:\/\/java.sun.com\/<\/a><br \/>\nresin -&gt; <a href=\"http:\/\/caucho.com\/\">http:\/\/caucho.com\/<\/a><\/p>\n<p>[root@localhost root]# cd \/usr\/local\/src\/<br \/>\n[root@localhost src]# tar xvzfp resin-3.0.23.tar.gz<br \/>\n[root@localhost src]# tar xvzfp httpd-2.2.3.tar.gz<br \/>\n[root@localhost src]# tar xvzfp mysql-5.0.26.tar.gz<br \/>\n[root@localhost src]# tar xvzfp php-5.1.6.tar.gz<br \/>\n[root@localhost src]# tar xvzfp ZendOptimizer-3.0.1-linux-glibc21-i386.tar.gz<\/p>\n<p>2. mysql \uc124\uce58<\/p>\n<p>[root@localhost src]# cd mysql-5.0.26\/<br \/>\n[root@localhost mysql-5.0.26]# .\/configure &#8211;prefix=\/usr\/local\/mysql &#8211;with-charset=euckr &amp;&amp; make &amp;&amp; make install<br \/>\n[root@localhost mysql-5.0.26]# cd \/usr\/local\/mysql\/bin\/<br \/>\n[root@localhost bin]# .\/mysql_install_db &#8211;user=mysql<br \/>\n[root@localhost bin]# \/usr\/local\/mysql\/bin\/mysqld_safe &amp;<\/p>\n<p>3. apache \uc124\uce58<\/p>\n<p>[root@localhost bin]# cd \/usr\/local\/src\/<br \/>\n[root@localhost src]# cd httpd-2.2.3\/<br \/>\n[root@localhost httpd-2.2.3]# .\/configure &#8211;prefix=\/usr\/local\/apache2 &#8211;enable-so &#8211;enable-mods-shared &#8211;enable-rewrite &#8211;enable-ssl &amp;&amp; make &amp;&amp; make install<br \/>\n[root@localhost httpd-2.2.3]# cd \/usr\/local\/apache2\/<br \/>\n[root@localhost apache2]# \/usr\/local\/apache2\/bin\/apachectl start<\/p>\n<p>4. jdk \uc124\uce58<\/p>\n<p>[root@localhost apache2]# cd \/usr\/local\/src<br \/>\n[root@localhost src]# sh jdk-1_5_0_09-linux-i586.bin<br \/>\n[root@localhost src]# mv jdk1.5.0_09\/ \/usr\/local\/java<br \/>\n[root@localhost src]# vi \/etc\/profile<\/p>\n<p>&#8211; \/etc\/export \ud30c\uc77c\uc5d0 \uc544\ub798\uc640 \uac19\uc774 java, resin \ud658\uacbd \ubcc0\uc218 \ucd94\uac00<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br \/>\nJAVA_HOME=\/usr\/local\/java<br \/>\nRESIN_HOME=\/usr\/local\/resin<br \/>\nCLASSPATH=&#8221;$JAVA_HOME\/lib\/tools.jar:$JAVA_HOME\/jre\/lib\/rt.jar&#8221;<br \/>\nexport JAVA_HOME CLASSPATH RESIN_HOME<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<\/p>\n<p>&#8211; \uc218\uc815\ub41c \/etc\/profile \uc801\uc6a9<br \/>\n[root@localhost src]# source \/etc\/profile<\/p>\n<p>5. resin \uc124\uce58<\/p>\n<p>[root@localhost src]# cd resin-3.0.23<br \/>\n[root@localhost resin-3.0.23]# .\/configure &#8211;prefix=\/usr\/local\/resin &#8211;with-apxs=\/usr\/local\/apache2\/bin\/apxs &amp;&amp; make &amp;&amp; make install<br \/>\n[root@localhost resin-3.0.23]# cd \/usr\/local\/src\/<\/p>\n<p>&#8211; apache\uc640 \uc5f0\ub3d9\ud574\uc11c \uc124\uce58\ud558\uae30 \uc704\ud574\uc11c &#8211;with-apxs \uc635\uc158\uc744 \ucd94\uac00\ud574\uc11c \uc124\uce58\ud55c\ub2e4. resin \uc124\uce58\uac00 \uc644\ub8cc\ub418\uba74, \/usr\/local\/apache2\/conf\/httpd.conf \ud30c\uc77c \ud558\ub2e8\uc5d0 \uc544\ub798\uc758\ub0b4\uc6a9\uc774 \ucd94\uac00\ub41c\ub2e4.<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br \/>\nLoadModule caucho_module \/usr\/local\/apache2\/modules\/mod_caucho.so<\/p>\n<p>ResinConfigServer localhost 6802<br \/>\nCauchoConfigCacheDirectory \/tmp<br \/>\nCauchoStatus yes<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<\/p>\n<p>6. php \uc124\uce58<\/p>\n<p>[root@localhost src]# cd php-5.1.6\/<br \/>\n[root@localhost php-5.1.6]# .\/configure &#8211;prefix=\/usr\/local\/php &#8211;with-mysql=\/usr\/local\/mysql &#8211;with-apxs2=\/usr\/local\/apache2\/bin\/apxs &#8211;enable-sysvshm=yes &#8211;enable-sysvsem=yes &#8211;enable-debug=no &#8211;enable-track-vars=yes &#8211;enable-url-fopen-wrapper=yes &#8211;with-ttf &#8211;with-png-dir=\/usr &#8211;with-zlib-dir &#8211;with-jpeg-dir=\/usr &#8211;with-gdbm=\/usr &#8211;enable-ftp &#8211;with-tiff-dir=\/usr &#8211;enable-memory-limit &#8211;enable-mbstring &#8211;with-expat-dir=\/usr &#8211;enable-sockets &#8211;enable-wddx &#8211;with-freetype-dir=\/usr &#8211;enable-bcmath &#8211;enable-mbstr-enc-trans &#8211;enable-mbregex &#8211;enable-exif &#8211;with-gd &#8211;enable-gd-native-ttf &#8211;enable-gd-imgstrttf &#8211;enable-calendar &#8211;with-openssl=\/usr &amp;&amp; make &amp;&amp; make install<br \/>\n[root@localhost php-5.1.6]# cp php.ini-dist \/usr\/local\/php\/lib\/php.ini<\/p>\n<p>&#8211; php \uc124\uce58\uac00 \uc644\ub8cc\ub418\uba74 \/usr\/local\/apache2\/conf\/httpd.conf \ud30c\uc77c\uc5d0 \uc544\ub798\uc640 \uac19\uc774 php \ubaa8\ub4c8\uc744 load \ud558\ub294 \ubd80\ubd84\uc774 \ucd94\uac00\ub418\uac8c \ub41c\ub2e4.<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br \/>\nLoadModule php5_module\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0modules\/libphp5.so<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<\/p>\n<p>&#8211; .html .htm \ub4f1\uc758 \ud655\uc7a5\uc790\uc5d0\uc11c\ub3c4 php \ucf54\ub4dc\uac00 \uc778\uc2dd\uac00\ub2a5 \ud558\ub3c4\ub85d httpd.conf \ud30c\uc77c\uc5d0 \uc544\ub798\uc640 \uac19\uc774 AddType \ubd80\ubd84\uc744 \ucd94\uac00\ud558\uace0, DirectoryIndex \ubd80\ubd84\uc5d0\ub3c4 Index \ud30c\uc77c \uc6b0\uc120\uc21c\uc704\ubcc4\ub85c \ud655\uc7a5\uc790\ub97c \ucd94\uac00\ud55c\ub2e4.<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br \/>\nAddType application\/x-httpd-php .php .php3 .ph .inc .html .htm .tpl<br \/>\nAddType application\/x-httpd-php-source .phps<\/p>\n<p>~<\/p>\n<p>&lt; IfModule dir_module&gt;<br \/>\nDirectoryIndex index.html index.htm index.php<br \/>\n&lt; \/IfModule&gt;<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<\/p>\n<p>7. Zend \uc124\uce58<\/p>\n<p>[root@localhost php-5.1.6]# cd \/usr\/local\/src\/ZendOptimizer-3.0.1-linux-glibc21-i386\/<br \/>\n[root@localhost ZendOptimizer-3.0.1-linux-glibc21-i386]# .\/install.sh<\/p>\n<p>&#8211; resin \ub370\ubaac \uc2e4\ud589 : \/usr\/local\/resin\/bin\/httpd.sh start<br \/>\n&#8211; apache \ub370\ubaac \uc2e4\ud589 : \/usr\/local\/apache2\/bin\/apachectl start<\/p>\n<p>&#8211; \uc774\uc0c1\uc758 \uc791\uc5c5\uc73c\ub85c mysql + apache + resin + php \uc758 \uc5f0\ub3d9 \uc124\uce58 \uc791\uc5c5\uc774 \ub05d\ub098\uac8c \ub41c\ub2e4.<\/p>\n<p>&#8211; \uac00\uc0c1\ud638\uc2a4\ud2b8 \uc124\uc815\uc744 \ud558\uae30\uc804 default \uc124\uc815\uc73c\ub85c\ub294 .html, .php, .htm \ub4f1\uc758 \ud655\uc7a5\uc790\ub85c \ub05d\ub098\ub294 \ud30c\uc77c\ub4e4\uc758 DocumentRoot \ub514\ub809\ud1a0\ub9ac\ub294 \/usr\/local\/apache2\/htdocs \ub514\ub809\ub85c\ub9ac, .jsp\ub85c \ub05d\ub098\ub294 \ud655\uc7a5\uc790\uc758 DocumentRoot \ub514\ub809\ud1a0\ub9ac\ub294 \/usr\/local\/resin\/webapps\/ROOT \uc774\ub2e4.<br \/>\n\uc989, http:\/\/\uc544\uc774\ud53c\uc8fc\uc18c\/*.html, http:\/\/\uc544\uc774\ud53c\uc8fc\uc18c\/*.htm, http:\/\/\uc544\uc774\ud53c\uc8fc\uc18c\/*.php \ub4f1\uc758 \ud30c\uc77c\uc740 \/usr\/local\/apache2\/htdocs \ub514\ub809\ud1a0\ub9ac\uc5d0\uc11c \ucc3e\uac8c\ub418\uba70 http:\/\/\uc544\uc774\ud53c\uc8fc\uc18c\/*.jsp \ud30c\uc77c\uc740 \/usr\/local\/resin\/webapps\/ROOT \ub514\ub809\ud1a0\ub9ac\uc5d0\uc11c \ucc3e\uac8c \ub41c\ub2e4.<\/p>\n<p>8. \uac00\uc0c1\ud638\uc2a4\ud2b8 \uc124\uc815<\/p>\n<p>&#8211; apache \uac00\uc0c1\ud638\uc2a4\ud2b8 \uc124\uc815<\/p>\n<p>\/usr\/local\/apache2\/conf\/httpd.conf \ud30c\uc77c\uc5d0\uc11c \uc544\ub798\uc640 \uac19\uc774 \/home\/*\/public_html \ub514\ub809\ud1a0\ub9ac\uc5d0 \ub300\ud55c \uad8c\ud55c \uc124\uc815\uc744 \ucd94\uac00\ud55c\ub2e4.<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br \/>\n&lt;Directory &#8220;\/home\/*\/public_html&#8221;&gt;<br \/>\nOptions Indexes FollowSymLinks<br \/>\nAllowOverride None<br \/>\nOrder allow,deny<br \/>\nAllow from all<br \/>\n&lt; \/Directory&gt;<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<\/p>\n<p>\uac00\uc0c1\ud638\uc2a4\ud2b8 \uc124\uc815 \ud30c\uc77c\uc778 conf\/extra\/httpd-vhosts.conf \ud30c\uc77c\uc744 Include \ud558\uae30 \uc704\ud574\uc11c httpd.conf \ud30c\uc77c\uc5d0\uc11c \uc544\ub798\uc640 \uac19\uc774 \uc8fc\uc11d\uc744 \uc81c\uac70\ud55c\ub2e4.<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br \/>\n# Virtual hosts<br \/>\nInclude conf\/extra\/httpd-vhosts.conf<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<\/p>\n<p>\/usr\/local\/apache2\/conf\/extra\/httpd-vhosts.conf \ud30c\uc77c\uc5d0 \uc544\ub798\uc640 \uac19\uc774 \uac00\uc0c1\ud638\uc2a4\ud2b8 \uc124\uc815\uc744 \ud55c \ud6c4\uc5d0 apache \ub370\ubaac\uc744 \ub9ac\uc2a4\ud0c0\ud2b8 \ud55c\ub2e4.<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br \/>\nNameVirtualHost 10.30.101.200<\/p>\n<p>#<br \/>\n# VirtualHost example:<br \/>\n# Almost any Apache directive may go into a VirtualHost container.<br \/>\n# The first VirtualHost section is used for all requests that do not<br \/>\n# match a ServerName or ServerAlias in any &lt;VirtualHost&gt; block.<br \/>\n#<br \/>\n&lt; VirtualHost 10.30.101.200&gt;<br \/>\nServerAdmin jook@hostway.co.kr<br \/>\nDocumentRoot \/home\/jook\/public_html<br \/>\nServerName www.jook.pe.kr<br \/>\nServerAlias jook.pe.kr<br \/>\nErrorLog logs\/jook.pe.kr-error_log<br \/>\nCustomLog logs\/jook.pe.kr-access_log common<br \/>\n&lt; \/VirtualHost&gt;<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<\/p>\n<p>[root@localhost conf]# \/usr\/local\/apache2\/bin\/apachectl restart<\/p>\n<p>&#8211; resin \uac00\uc0c1\ud638\uc2a4\ud2b8 \uc124\uc815<\/p>\n<p>resin\uc758 \uc124\uc815\ud30c\uc77c\uc740 \/usr\/local\/resin\/conf\/resin.conf \ud30c\uc77c\uc774\uba70, default host \uc124\uc815\uc740 \uc544\ub798\uc640 \uac19\uc774 \ub418\uc5b4 \uc788\uc73c\uba70, default DocumentRoot \ub514\ub809\ud1a0\ub9ac\ub97c \ubcc0\uacbd\ud558\ub824\uba74 &lt;web-app id=&#8221;\/&#8221; document-directory=&#8221;webapps\/ROOT&#8221;\/&gt; \ubd80\ubd84\uc5d0\uc11c \ubcc0\uacbd\ud560 \uc218 \uc788\ub2e4.<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br \/>\n&lt;host id=&#8221;&#8221; root-directory=&#8221;.&#8221;&gt;<br \/>\n&lt;!&#8211;<br \/>\n&#8211; configures an explicit root web-app matching the<br \/>\n&#8211; webapp&#8217;s ROOT<br \/>\n&#8211;&gt;<br \/>\n&lt;web-app id=&#8221;\/&#8221; document-directory=&#8221;webapps\/ROOT&#8221;\/&gt;<\/p>\n<p>&lt;resin:if test=&#8221;${java.isJava5()}&#8221;&gt;<br \/>\n&lt;!&#8211;<br \/>\n&#8211; Administration application \/resin-admin<br \/>\n&#8211;<br \/>\n&#8211; password is the md5 hash of the password.<br \/>\n&#8211; localhost is true to limit access to the localhost<br \/>\n&#8211;&gt;<br \/>\n&lt;resin:set var=&#8221;resin_admin_password&#8221;\u00a0\u00a0default=&#8221;&#8221;\/&gt;<br \/>\n&lt;resin:set var=&#8221;resin_admin_localhost&#8221; default=&#8221;true&#8221;\/&gt;<\/p>\n<p>&lt;web-app id=&#8221;\/resin-admin&#8221; document-directory=&#8221;${resin.home}\/php\/admin&#8221;\/&gt;<br \/>\n&lt;\/resin:if&gt;<br \/>\n&lt;\/host&gt;<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n<p>\uac00\uc0c1\ud638\uc2a4\ud2b8 \ucd94\uac00\ub294 \uc544\ub798\uc640 \uac19\uc740 \ud615\uc2dd\uc73c\ub85c \ucd94\uac00\ud558\uba70, \ucd94\uac00\uc704\uce58\ub294 default host \uc124\uc815\ubd80\ubd84\uc758 \uc544\ub798\uc5d0 \ucc28\ub840\ub85c \ucd94\uac00 \ud558\uba74 \ub41c\ub2e4.<br \/>\n\uac00\uc0c1\ud638\uc2a4\ud2b8 \ucd94\uac00\uc644\ub8cc\ud6c4 resin \ub370\ubaac\uc744 restart \ud55c\ub2e4.<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br \/>\n&lt;host id=&#8221;www.jook.pe.kr&#8221; root-directory=&#8221;\/home\/jook&#8221;&gt;<br \/>\n&lt;host-alias&gt;jook.pe.kr&lt;\/host-alias&gt;<br \/>\n&lt;web-app id=&#8221;\/&#8221; document-directory=&#8221;public_html&#8221;\/&gt;<br \/>\n&lt;\/host&gt;<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n<p>[root@localhost conf]# \/usr\/local\/resin\/bin\/httpd.sh stop<br \/>\n[root@localhost conf]# \/usr\/local\/resin\/bin\/httpd.sh start<\/p>\n<p>9. mysql connector \uc124\uce58<\/p>\n<p>&#8211; jsp\ub97c \uc774\uc6a9\ud574\uc11c mysql\uc744 \uc5f0\uacb0\ud558\uae30 \uc704\ud574\uc11c\ub294 mysql connector\ub97c \uc124\uce58\ud574\uc57c\ud55c\ub2e4.<br \/>\nconnector\ub294 <a href=\"http:\/\/mysql.com\/\">http:\/\/mysql.com<\/a> \uc5d0\uc11c \ub2e4\uc6b4\ub85c\ub4dc \ubc1b\uc744\uc218 \uc788\ub2e4.<br \/>\n<a href=\"http:\/\/mysql.com\/\">http:\/\/mysql.com<\/a> \uc5d0\uc11c &#8220;Downloads&#8221; -&gt; &#8220;Connectors&#8221; -&gt; &#8220;Connector\/J&#8221; \uba54\ub274\uc5d0\uc11c \ub2e4\uc6b4\ub85c\ub4dc \ubc1b\uc544\uc11c \/usr\/local\/src \ub514\ub809\ud1a0\ub9ac\uc5d0 \uc5c5\ub85c\ub4dc \ud55c\ud6c4 \uc555\ucd95 \ud574\uc81c\ud55c\ub2e4.<br \/>\nmysql \uc5f0\uacb0\uc5d0 \ud544\uc694\ud55c connector \ud30c\uc77c\uc740 mysql-connector-java-5.0.7-bin.jar \uc774\uae30 \ub54c\ubb38\uc5d0 mysql-connector-java-5.0.7-bin.jar \ud30c\uc77c\uc744 \/usr\/local\/java\/lib \ub514\ub809\ud1a0\ub9ac\uc5d0 \uc62e\uaca8\ub193\uace0, \/etc\/profile\uc5d0\uc11c CLASSPATH\uc5d0 \ucd94\uac00\ud55c\ub2e4.<\/p>\n<p>[root@localhost conf]# cd \/usr\/local\/src<br \/>\n[root@localhost src]# tar xvzfp mysql-connector-java-5.0.7.tar.gz<br \/>\n[root@localhost src]# cd mysql-connector-java-5.0.7<br \/>\n[root@localhost mysql-connector-java-5.0.7]# cp mysql-connector-java-5.0.7-bin.jar \/usr\/local\/java\/lib<br \/>\n[root@localhost mysql-connector-java-5.0.7]# vi \/etc\/profile<\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br \/>\nCLASSPATH=&#8221;$JAVA_HOME\/lib\/mysql-connector-java-5.0.7-bin.jar:$JAVA_HOME\/lib\/tools.jar:$JAVA_HOME\/jre\/lib\/rt.jar&#8221;<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<\/p>\n<p>[root@localhost mysql-connector-java-5.0.7]# source \/etc\/profile<\/p>\n<p>&#8211; \ucd5c\uc885\uc801\uc73c\ub85c resin \ub370\ubaac\uc744 \uc7ac\uc2dc\uc791 \ud558\uba74 \ubaa8\ub4e0 \uc791\uc5c5\uc774 \uc644\ub8cc\ub418\uac8c \ub41c\ub2e4.<\/p>\n<p>[root@localhost mysql-connector-java-5.0.7]# cd \/usr\/local\/resin\/bin<br \/>\n[root@localhost bin]# \/usr\/local\/resin\/bin\/httpd.sh stop<br \/>\n[root@localhost bin]# \/usr\/local\/resin\/bin\/httpd.sh start<\/p>\n<p>10. php, jsp mysql \uc5f0\uacb0 \ud655\uc778<\/p>\n<p>&#8211; \uc544\ub798\uc640 \uac19\uc774 test.php, test.jsp, dbtest.jsp \ud30c\uc77c\uc744 \ub9cc\ub4e4\uc5b4 DocumentRoot \ub514\ub809\ud1a0\ub9ac\uc5d0 \uc5c5\ub85c\ub4dc \ud558\uace0 \uc6f9\uc0c1\uc5d0\uc11c php\uc640 jsp\uac00 \uc815\uc0c1\uc801\uc73c\ub85c \ub3d9\uc791\ud558\ub294\uc9c0, \uc774\uc0c1\uc5c6\uc774 DB \uc5f0\uacb0\uc774 \ub418\ub294\uc9c0\ub97c \ud14c\uc2a4\ud2b8 \ud55c\ub2e4.<\/p>\n<p>test.php<br \/>\n&#8212;&#8212;&#8212;-<br \/>\n&lt; ?<br \/>\nphpinfo();<br \/>\n?&gt;<br \/>\n&#8212;&#8212;&#8212;-<\/p>\n<p>test.jsp<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br \/>\n2 + 2 = &lt;%= 2 + 2 %&gt;<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n<p>dbtest.jsp<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br \/>\n&lt; %@ page import=&#8221;java.sql.*&#8221;<br \/>\ncontentType=&#8221;text\/html;charset=euc-kr&#8221;%&gt;<br \/>\n&lt; %<br \/>\nString DB_URL = &#8220;jdbc:mysql:\/\/localhost:3306\/mysql&#8221;;<br \/>\nString DB_USER = &#8220;root&#8221;;<br \/>\nString DB_PASSWORD= &#8220;&#8221;;<br \/>\nConnection conn;<br \/>\nStatement stmt;<br \/>\ntry {<br \/>\nClass.forName(&#8220;org.gjt.mm.mysql.Driver&#8221;);<br \/>\nconn = DriverManager.getConnection(DB_URL, DB_USER, DB_PASSWORD);<br \/>\nstmt = conn.createStatement();<br \/>\nconn.close();<br \/>\nout.println(&#8220;MySQL connected&#8221;);<br \/>\n} catch(Exception e)<br \/>\n{out.println(e);}<br \/>\n%&gt;<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<\/p>\n","protected":false},"excerpt":{"rendered":"<p>mysql + apache + jdk + resin + php + Zend \uc124\uce58 php\uc640 jsp \uac19\uc774 \uc0ac\uc6a9\ud558\uae30 1. source \ud30c\uc77c \ub2e4\uc6b4\ub85c\ub4dc<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,5],"tags":[],"_links":{"self":[{"href":"http:\/\/jook.pe.kr\/index.php?rest_route=\/wp\/v2\/posts\/124"}],"collection":[{"href":"http:\/\/jook.pe.kr\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/jook.pe.kr\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/jook.pe.kr\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/jook.pe.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=124"}],"version-history":[{"count":0,"href":"http:\/\/jook.pe.kr\/index.php?rest_route=\/wp\/v2\/posts\/124\/revisions"}],"wp:attachment":[{"href":"http:\/\/jook.pe.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=124"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/jook.pe.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=124"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/jook.pe.kr\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=124"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}