Apache + Zend Optimizer ¼³Ä¡ Á¤¿ø¿µ suni00@kernel.pe.kr v0.2, 2000³â 3¿ù 16ÀÏ Apache À¥¼­¹ö¿¡ Zend Optimizer¸¦ ¸ðµâ·Î ÄÄÆÄÀÏÇÏ°í ±âÁ¸ÀÇ PHP3, Zend¿ÍÀÇ ¼Óµµ¸¦ Å×½ºÆ® Çغ¸¾Ò´Ù. ______________________________________________________________________ ¸ñÂ÷ 1. Zend Optimizer¶õ? 2. ¼³Ä¡È¯°æ 3. ÄÄÆÄÀÏ ÇϱâÀü 4. Apache + Zend Optimizer ÄÄÆÄÀÏ 5. Å×½ºÆ® Çϱâ ______________________________________________________________________ 1. Zend Optimizer¶õ? Zend Optimizer´Â Ç¥ÁØ Zend ·± ŸÀÓ ÄÄÆÄÀÏ·¯¿¡ ÀÇÇØ »ý¼ºµÇ´Â Áß°£ Äڵ带 Á¶»çÇÏ°í£¬´õ ºü¸¥ ½ÇÇàÀ¸·Î ±×°ÍÀ» ÃÖÀûÈ­Çß´Ù°í ÇÑ´Ù. ±âÁ¸ÀÇ PHP3¿Í Zend¿¡¼­ º¸¿©ÁÖ´Â ¼Óµµ¸¸Å­ ´õ »¡¶óÁ³´Ù´Â°É ü°¨ ÇÒ¼ö ÀÖ¾ú´Ù. 2. ¼³Ä¡È¯°æ ¼³Ä¡È¯°æÀº glibc 2.1 ÀÌ»ó, ¾ÆÆÄÄ¡ 1.3ÀÌ»óÀÇ ¹öÀüÀÌ¸ç °¢°¢ÀÇ ¼³Ä¡¹öÀüÀº ´ÙÀ½°ú °°´Ù. o Apache : 1.3.12 o Zend : Zend beta4 p1 + Zend Optimizer ´ÙÀ½ »çÀÌÆ®¿¡¼­ ±¸ÇÑ´Ù. Zend beta4 p1À» ¼³Ä¡ÇßÀ»¶§ ÇѱÛÀÌ ±úÁö´Â Çö»óÀÌ Àִµ¥ ÀÌ´Â /usr/local/php-4.0b4pl1/sapi/apache/mod_php4.c ÆÄÀÏÀ» ¿­¾î¼­ text/html;charset=iso-8859-1¸¦ text/html;charset=EUC_KR·Î ¹Ù²ãÁÖ°í ÄÄÆÄÀÏÇØ¾ß ÇÑ´Ù. 3. ÄÄÆÄÀÏ ÇϱâÀü Zend OptimizerÀÇ tar¸¦ Ç®°í ´ÙÀ½°ú °°Àº ÀÛ¾÷À» ÇÑ´Ù. o tar Ç®¾î¼­ ³ª¿Â ZendOptimizer.so¸¦ /usr/local/Zend/lib µð·ºÅ丮¸¦ ¸¸µé¾î¼­ ±× ¾È¿¡ ³Ö´Â´Ù. 4. Apache + Zend Optimizer ÄÄÆÄÀÏ ¾ÆÆÄÄ¡¿Í Zend ¸ðµÎ /usr/local µð·ºÅ丮¿¡ Ç®¾úÀ¸¸ç ¾ÆÆÄÄ¡ÀÇ ¼Ò½º µð·ºÅ丮´Â /usr/local/apache_1.3.12 À̸ç ZendÀÇ ¼Ò½º µð·ºÅ丮´Â /usr/local/php-4.0b4pl1 ÀÌ´Ù. ¸ðµç°Ç root °èÁ¤À¸·Î ÀÛ¾÷ÇÑ´Ù. # cd /usr/local/apache_1.3.12 (¾ÆÆÄÄ¡ ¼Ò½º µð·ºÅ丮·Î À̵¿) # ./configure --prefix=/etc/httpd (ÄÄÆÄÀÏÈÄ »ý¼º ÆÄÀÏÀÇ °æ·Î´Â /etc/httpd ÀÌ´Ù) # cd /usr/local/php-4.0b4pl1 (Zend ¼Ò½º µð·ºÅ丮·Î À̵¿) # ./configure --with-apache=/usr/local/apache_1.3.12 --disable-debug (Optimizer¸¦ À§ÇÑ ¿É¼Ç) (ÀÌ¿Ü ´Ù¸¥ Ãß°¡ ¿É¼Çµéµµ ÇÑÁÙ¿¡ ÀÌ¾î ½á¾ßÇÑ´Ù) # make # make install (Zend ¼³Ä¡) # cp php.ini-dist /usr/local/lib/php.ini (php ¿É¼Çµé) # cd /usr/local/apache_1.3.12 (¾ÆÆÄÄ¡ µð·ºÅ丮·Î À̵¿) # ./configure --prefix=/etc/httpd --activate-module=src/modules/php4/libphp4.a (Zend¸¦ ¸ðµâ·Î Æ÷ÇÔ½ÃÅ´, ¿ª½Ã ÇÑÁÙ·Î ÀÌ¾î ½á¾ßÇÑ´Ù) # make # make install (¾ÆÆÄÄ¡ ¼³Ä¡) ¼³Ä¡ÈÄ ¾ÆÆÄÄ¡ ȯ°æ¼³Á¤ ÆÄÀÏÀÎ /etc/httpd/conf/httpd.conf ÆÄÀÏÀ» ¿­¾î ´ÙÀ½°ú °°ÀÌ µÇ¾îÀÖ´ÂÁö È®ÀÎÇÏ°í ÁÖ¼®À» Ç®¾îÁØ´Ù. AddType application/x-httpd-php .php AddType application/x-httpd-php-source .phps ´ÙÀ½À¸·Î /usr/local/lib/php.ini ÆÄÀÏ¿¡ ´ÙÀ½ µÎÁÙÀ» Ãß°¡ÇÑ´Ù.(Optimizer¿¡¼­ Ãß°¡µÈ ºÎºÐ) zend_optimizer.optimization_level=1 zend_extension="/usr/local/Zend/lib/ZendOptimizer.so" ÀÌÁ¦ ¾ÆÆÄÄ¡ µ¥¸óÀ» ¶ç¿î´Ù. /etc/httpd/bin/apachectl start 5. Å×½ºÆ® Çϱ⠿©±â¼± Zend °¡ Optimizer µÇ¾ú´ÂÁö ÀÌÀüÀÇ ¹öÀüµé°úÀÇ ¼ÓµµÂ÷ÀÌ´Â ¾î¶²Áö ´ÙÀ½°ú °°ÀÌ Å×½ºÆ® Çغ¸ÀÚ. o phpinfo()·Î È®ÀÎÇϱâ À§¿Í°°ÀÌ ÇßÀ»¶§ ´ÙÀ½°ú °°Àº Á¤º¸°¡ ³ª¿À¸é ¼º°øÀÌ´Ù. This program makes use of the Zend scripting language engine: Zend Engine v0.90, Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski with Optimizer v0.95, Copyright (c) 1998-2000, by Zend Technologies Ltd. o ¼Óµµ Å×½ºÆ® ÀÚ½ÅÀÇ ½Ã½ºÅÛ¿¡¼­ ´ÙÀ½°ú °°Àº ÇÁ·Î±×·¡¹ÖÀ¸·Î OptimizerÇϱâÀü°ú ºñ±³ÇØ º¸¶ó. Âü°í·Î ¼¿·¯·Ð 400a(128KB cache)¿¡¼­ Zend beta4 p1À» ÇßÀ»¶§ 18ÃÊ°¡ ³ª¿Ô´Âµ¥ Optimizer¸¦ ÇÏ°í³­ÈÄ 7ÃÊ°¡ ³ª¿Ô´Ù. --------------------------------------------------------------------- ÆóÀÎ http://kernel.pe.kr/~suni00