Home | Data Center | Contact US | Login

Á¦¸ñ APM ¼Ò½º¼³Ä¡
÷ºÎÆÄÀÏ APM ¼Ò½º¼³Ä¡.pdf ÀÛ¼ºÀÏ 2007-01-30 12:04:48

ÀÛ¼ºÀÚ : ±â¼úÁö¿øºÎ ±è »ï ¼ö kiss@nextline.net

APM ¿¬µ¿¼³Ä¡

APM À̶õ?
¸®´ª½ºÀÇ APM(APACHE + PHP + MYSQL)±â¹ÝÀÇ À¥ ¼­ºñ½º¸¦ À̸£´Â ¸»ÀÔ´Ï´Ù.

ÇÊ¿ä»çÇ×
APM ¿¬µ¿¼³Ä¡¸¦ À§Çؼ­´Â APACHE, PHP, MYSQL, ZEND, GD ¿Ü ¶óÀ̺귯¸®°¡ ÇÊ¿ä ÇÕ´Ï´Ù.

(1) ´Ù¿î·Îµå

¨ç APACHE¸¦ ´Ù¿î·Îµå ÇÕ´Ï´Ù.
http://httpd.apache.org
wgetÀº À¥¿¡¼­ ÀÚµ¿ÀûÀ¸·Î ÆÄÀÏÀ» ¹Þ¾Æ¿À´Âµ¥ »ç¿ëµÇ´Â À¯Æ¿¸®Æ¼À̸ç HTTP, HTTPS, FTP ÇÁ·ÎÅäÄÝÀ» Áö¿øÇÕ´Ï´Ù.

¸®´ª½º ½© ¸í·É¾î
[root@nextline ~]# wget http://mirror.apache.or.kr/httpd/apache_1.3.37.tar.gz

 
¨è PHP¸¦ ´Ù¿î·Îµå ÇÕ´Ï´Ù.
http://www.php.net

¸®´ª½º ½© ¸í·É¾î
[root@nextline /]# wget http://snaps.php.net/php4-STABLE-200701010530.tar.gz

 
¨é MYSQL¸¦ ´Ù¿î·Îµå ÇÕ´Ï´Ù.
http://www.mysql.com
ftp://mysql.byungsoo.net/pub/mysql/Downloads/MySQL-4.1/

¸®´ª½º ½© ¸í·É¾î
[root@nextline /]#
wget ftp://mysql.byungsoo.net/pub/mysql/Downloads/MySQL-4.1/mysql-4.1.20.tar.gz

 
¨ê ZEND Optimizer¸¦ ´Ù¿î·ÎµåÇÕ´Ï´Ù.
http://www.zend.com
http://downloads.zend.com/optimizer/

¸®´ª½º ½© ¸í·É¾î
[root@nextline /]#
wget http://downloads.zend.com/optimizer/2.6.0/ZendOptimizer-2.6.0-linux-glibc21-i386.tar.gz

 
¨ë GD
µ¿ÀûÀ̹ÌÁö »ý¼º ANSI C¶óÀ̺귯¸® ÀÔ´Ï´Ù.
http://www.boutell.com/gd
[root@nextline /]# wget http://www.boutell.com/gd/http/gd-2.0.33.tar.gz

 
¨ì ÆÄÀÏÈ®ÀÎ
´Ù¿î·Îµå µÈ ÆÄÀÏÀ» È®ÀÎÇÕ´Ï´Ù.

 
¨í ¶óÀ̺귯¸® ´Ù¿î·Îµå

OS ¹öÀü º° rpm ÆÐÅ°Áö¸¦ ´Ù¿î·Îµå ÇÕ´Ï´Ù.
CentOS
http://mirror.secuidc.com/centos

Fedora Core
http://download.fedoralegacy.org

±× ¿Ü ¹öÀü rpm find »çÀÌÆ®
http://fr.rpmfind.net/linux/

JPEG ¾ÐÃà/ÇØÁ¦ ¶óÀ̺귯¸® ¼ÒÇÁÆ®¿þ¾î ÀÔ´Ï´Ù.
libjpeg-devel-6b-31.1.i386.rpm

PNGÆ÷¸äÀÇ À̹ÌÁöÆÄÀÏÀ» »ç¿ëÇϱâ À§ÇÑ Æ÷ÅÍºí ³×Æ®¿öÅ© ±×·¡ÇÈ ¶óÀ̺귯¸® ÀÔ´Ï´Ù.
libpng-devel-1.0.12-2.i386.rpm

C++ ¶óÀ̺귯¸® ÀÔ´Ï´Ù.
compat-libstdc++-7.3-2.96.126.i386.rpm

¸ÞÀϹڽºÀ» ¾×¼¼½º Çϱâ À§ÇÑ ÀϹÝÀûÀÎ API·Î¼­ PHP¿¡ ÀÇÇØ ³»ºÎ¿¡ »ç¿ëµË´Ï´Ù.
libc-client-2002e-5.i386.rpm

IMAP ¶óÀ̺귯¸®À» ÀÌ¿ëÇÒ ÇÁ·Î±×·¥À» À§ÇÑ °³¹ß µµ±¸ÀÔ´Ï´Ù.
libc-client-devel-2002e-5.i386.rpm

¨î ¶óÀ̺귯¸® È®ÀÎ

À§ ¶óÀ̺귯¸®°¡ ¼³Ä¡µÇ¾î ÀÖ´ÂÁö È®ÀÎÇÕ´Ï´Ù.

rpm Á¶È¸¿É¼Ç
-q : ÆÐÅ°Áö°¡ ¼³Ä¡µÇ¾î ÀÖ´ÂÁö ÁúÀÇÇϸç ÀÌ ¿É¼ÇÀ» ´Üµ¶À¸·Î »ç¿ëÇϸé ÆÐÅ°Áö À̸§°ú ¹öÁ¯¸¸ Ç¥½ÃµË´Ï´Ù.
-qa : ÇöÀç ¼³Ä¡µÈ ¸ðµç ÆÐÅ°Áö ¸ñ·ÏÀ» ã´Âµ¥ »ç¿ëÇÕ´Ï´Ù.
-qi : ÇöÀç ¼³Ä¡µÈ ÆÐÅ°ÁöÀÇ °£·«ÇÑ Á¤º¸¸¦ Ãâ·ÂÇÕ´Ï´Ù.
-ql : ÇöÀç ¼³Ä¡µÈ ÆÐÅ°ÁöÀÇ ³»¿ëÀ» º¸¿©ÁÖ¸ç ¾î¶² ÆÄÀÏÀÌ ¾îµð¿¡ ¼³Ä¡µÇ¾î ÀÖ´ÂÁö È®ÀÎÇÒ ¶§ »ç¿ëÇÕ´Ï´Ù.
-qa, -qi, -ql ¿É¼ÇÀº º¸Åë grep¸í·É°ú °°ÀÌ »ç¿ëµË´Ï´Ù.

ƯÁ¤ rpmÆÐÅ°ÁöÀÇ ¼³Ä¡¿©ºÎ È®ÀÎÇϱâ
»ç¿ëÇü½Ä : rpm –qa | grep È®ÀÎÇÏ°íÀÚ ÇÏ´Â ÆÐÅ°Áö À̸§¹®ÀÚ¿­
¡°|¡± ÆÄÀÌÇÁ : ¾ÕÀÇ rpm –qaÇÑ °á°ú¸¦ ±×´ë·Î grep¿¡°Ô ³Ñ°ÜÁÖ´Â °Ì´Ï´Ù. grep´Â ¾î¶² ÆÐÅÏ¿¡ ¸Â´Â °ÍÀ» »Ì¾Æ³»´Â ¿ªÇÒÀ» ÁÖ·Î Çϴµ¥ ¾Õ¿¡¼­ ³Ñ¾î¿Â rpmÆÐÅ°Áö ¸®½ºÆ® Áß¿¡¼­ ÆÐÅ°Áö À̸§¹®ÀÚ¿­¿¡ ÇØ´çÇÏ´Â °Í¸¸ »Ì¾Æ³»°Ô µË´Ï´Ù.

¸®´ª½º ½© ¸í·É¾î
[root@nextline ~]# rpm –qa | grep libjpeg-devel-6b
[root@nextline ~]# rpm –qa | grep libpng-devel
[root@nextline ~]# rpm –qa | compat-libstdc++
[root@nextline ~]# rpm –qa | grep libc-client-2002e
[root@nextline ~]# rpm –qa | grep libc-client-devel-2002e


¨ï ¶óÀ̺귯¸® ¼³Ä¡
À§ ¶óÀ̺귯¸®°¡ ¼³Ä¡µÇ¾î ÀÖÁö ¾ÊÀ» ½Ã ¹öÀü º° ftp »çÀÌÆ®¿¡ ¹æ¹®ÇÏ¿© ´Ù¿î·Îµå ÇÑ ÈÄ ÇØ´ç rpm ÆÐÅ°Áö¸¦ ¼³Ä¡ÇÕ´Ï´Ù.

rpm ÆÐÅ°Áö ¼³Ä¡
ex) libc-client-devel-2002e-5.i386.rpm

rpmÆÐÅ°Áö ¼³Ä¡¿É¼Ç
>rpm -U ¿É¼Ç : ÀÌÀü¹öÁ¯ÀÌ ¼³Ä¡µÇ¾î ÀÖÀ¸¸é ¾÷±×·¹À̵带 Çϸç, ¼³Ä¡µÇ¾î ÀÖÁö ¾ÊÀ¸¸é »õ·Ó°Ô ¼³Ä¡ÇÕ´Ï´Ù. ÀÌÀü¹öÁ¯ÀÌ ¼³Ä¡µÇ¾î ÀÖÀ» °æ¿ì¿¡ ȯ°æ¼³Á¤ÆÄÀÏÀ» Á¦¿ÜÇÏ°í ¸ðµÎ »õ·Ó°Ô ¼³Ä¡ÇÏ°Ô µÇ¸ç ¼³Ä¡½Ã¿¡ À̿ɼÇÀ» »ç¿ëÇϵµ·Ï ÇÕ´Ï´Ù.
rpm -v ¿É¼Ç : ¼³Ä¡ Áß ¸Þ½ÃÁö¸¦ º¸¿©ÁÝ´Ï´Ù.
rpm -h ¿É¼Ç : ÁøÇà°úÁ¤À» '#'À¸·Î Ç¥½ÃÇÕ´Ï´Ù. (--hash)
rpm ¸í·É¾î »ç¿ë¹ý
rpm [¿É¼Ç] ÆÐÅ°Áö¸í

¸®´ª½º ½© ¸í·É¾î
[root@nextline ~]# rpm –Uvh libc-client-devel-2002e-5.i386.rpm

(2) ¾ÐÃàÇØÁ¦

¶óÀ̺귯¸® ¼³Ä¡°¡ ¿Ï·áµÇ¾úÀ¸¸é apm¿¬µ¿ ¼³Ä¡¸¦ À§ÇØ ´Ù¿î·ÎµåÇÑ ÆÄÀÏÀÇ ¾ÐÃàÀ» ÇØÁ¦ ÇÕ´Ï´Ù.

tar ¸í·É¾î ¿É¼Ç
tar ¸í·É¾î´Â ÆÄÀÏÀ» ¹­°Å³ª Ç® ¶§ »ç¿ëµÇ´Â ¸®´ª½º ¸í·É¾î ÀÔ´Ï´Ù.
c : tar ÆÄÀÏÀ» »ý¼ºÇÒ ¶§(¿©·¯ °³ÀÇ ÆÄÀÏÀ» ÇϳªÀÇ ÆÄÀÏ·Î ¹­À» ¶§)
v : ¹­À» ¶§³ª Ç®¾îÁÙ ¶§ ÆÄÀϵéÀÇ ³»¿ëÀ» ÀÚ¼¼ÇÏ°Ô º¸·Á°í ÇÒ ¶§.
z : gzip°ú °ü·ÃÇÏ¿© ¾ÐÃàÀ̳ª ÇØÁ¦¸¦ ÇѲ¨¹ø¿¡ ÇÏ·Á°í ÇÒ ¶§ »ç¿ë.
x : ÁÖ¾îÁø À̸§ÀÇ ÆÄÀÏ¿¡ ´ëÇÏ¿© ÃßÃâ
»ç¿ë¹ý : tar [¿É¼Ç] ÆÄÀϸí

¨ç ´Ù¿î·Îµå ÇÑ ¸ðµç ÆÄÀÏÀÇ ¾ÐÃàÀ» ÇØÁ¦ ÇÕ´Ï´Ù.

¸®´ª½º ½© ¸í·É¾î
[root@nextline ~]# tar zxvf mysql-4.1.20.tar.gz
[root@nextline ~]# tar zxvf php4-STABLE-200701010530.tar.gz
[root@nextline ~]# tar zxvf gd-2.0.33.tar.gz
[root@nextline ~]# tar zxvf apache_1.3.37.tar.gz
[root@nextline ~]# tar zxvf ZendOptimizer-2.6.0-linux-glibc21-i386.tar.gz
Mysql-4.1.20.tar.gz ¾ÐÃàÇØÁ¦ È­¸éÀÔ´Ï´Ù.

 
¨è ¾ÐÃàÇØÁ¦ ÆÄÀÏÈ®ÀÎ

 
(3) Mysql ¼³Ä¡

¸®´ª½º ½© ¸í·É¾î

¨ç ¾ÐÃàÇØÁ¦ ÇÑ mysql-4.1.20µð·ºÅ丮·Î À̵¿ÇÕ´Ï´Ù.
[root@nextline ~]# cd mysql-4.1.20

ÄÄÆÄÀÏ ¿É¼Ç
--prefix=/usr/local/mysql : ¼³Ä¡ÇÒ °æ·Î¸¦ ÁöÁ¤ÇÕ´Ï´Ù.
--with-charset=euckr : ÇѱÛÁö¿øÀ» Çϱâ À§ÇÑ ¿É¼ÇÀÔ´Ï´Ù. ÁÖÀÇÇÏ½Ç °ÍÀº 4.1.x ÀÌÈÄ ¹öÀü ºÎÅÍ´Â euckr·Î ÁöÁ¤Çϸç, ÀÌÀü¹öÀü¿¡¼­´Â euc_kr·Î ÁöÁ¤ÇÕ´Ï´Ù.

¨è ÄÄÆÄÀÏ È¯°æ¼³Á¤
[root@nextline mysql-4.1.20]# ./configure -–prefix=/usr/local/mysql –with-charset=euckr

 
¨é ÄÄÆÄÀÏÀ» Çϱâ À§ÇÏ¿© make¸¦ ½ÇÇàÇÕ´Ï´Ù.
[root@nextline mysql-4.1.20]# make


¨ê /usr/local/mysql µð·ºÅ丮³»¿¡ mysql µ¥ÀÌÅͺ£À̽º ÆÄÀϵéÀ» ½ÇÁ¦ »ý¼ºÇϱâ À§ÇÏ¿©make install¸¦ ½ÇÇàÇÕ´Ï´Ù.
[root@nextline mysql-4.1.20]# make install


¨ë mysql µ¥ÀÌÅͺ£À̽ºÀÇ µ¥ÀÌÅÍ µð·ºÅ丮À» »ý¼ºÇÏ¿© À§ÇÏ¿© mysql_install_db¸¦ ½ÇÇàÇÕ´Ï´Ù.
[root@nextline mysql-4.1.20]#/usr/local/mysql/bin/mysql_install_db


¨ì mysql °èÁ¤ »ý¼º ¹× mysql µð·ºÅ丮ÀÇ ¼ÒÀ¯±Ç°ú ±×·ìÀ» mysql·Î ÁöÁ¤ÇÕ´Ï´Ù.
[root@nextline mysql-4.1.20]#usradd –M –s /sbin/nologin mysql; passwd mysql
New UNIX password : [mysql Æнº¿öµå¸¦ ÁöÁ¤ÇÕ´Ï´Ù]
Retype new UNIX password : [mysql Æнº¿öµå¸¦ Àç ÀÔ·ÂÇÕ´Ï´Ù]

Chown : ¸®´ª½ºÀÇ ¼ÒÀ¯±Ç º¯°æ ¸í·É¾î ÀÔ´Ï´Ù.
-R : ÇÏÀ§ µð·ºÅ丮±îÁö ¸ðµÎ Àû¿ëÇÕ´Ï´Ù.
[root@nextline mysql-4.1.20]#chown –R mysql.mysql /usr/local/mysql

 
¨í mysql¸¦ ¹é±×¶ó¿îµå·Î ±¸µ¿ÇÕ´Ï´Ù.
[root@nextline mysql-4.1.20]#/usr/local/mysql/bin/mysqld_safe &
Æнº¿öµå¸¦ À§¿Í µ¿ÀÏÇÏ°Ô ¼³Á¤ÇÕ´Ï´Ù.
[root@nextline mysql-4.1.20]#/usr/local/mysql/bin/mysqladmin –u root password ¡®xxxxxx¡¯

 
¨î mysql Á¢¼ÓÅ×½ºÆ®
[root@nextline mysql-4.1.20]#mysql –u root –p
Á¢¼ÓÀÌ Á¤»óÀûÀ¸·Î ÀÌ·ç¾îÁö¸ç mysql ¼³Ä¡°¡ ¿Ï·áµÈ È­¸éÀÔ´Ï´Ù.

 
(4) Apache ¼³Ä¡

¨ç ¾ÐÃàÇØÁ¦ ÇÑ apache_1.3.37 µð·ºÅ丮·Î À̵¿ÇÕ´Ï´Ù.
[root@nextline ~]# cd apache_1.3.37

ÄÄÆÄÀÏ ¿É¼Ç
--prefix=/usr/local/apache : apache¼³Ä¡µÉ µð·ºÅ丮 °æ·Î¸¦ ÁöÁ¤ÇÕ´Ï´Ù.
DSO¹æ½ÄÀ¸·Î ¼³Ä¡Çϱâ À§ÇÑ ¿É¼ÇÀÔ´Ï´Ù.
--enable-rule=SHARED_CORE –enable-shared=max –enable-module=so

¨è ÄÄÆÄÀÏÀ» Çϱâ À§ÇÏ¿© ȯ°æ ¼³Á¤À» ÇÕ´Ï´Ù.
[root@nextline apache_1.3.37]# ./configure --prefix=/usr/local/apache --enable-rule=SHARED_CORE --enable-shared=max --enable-module=so

 
¨é ÄÄÆÄÀÏÀ» Çϱâ À§ÇÏ¿© make¸¦ ½ÇÇàÇÕ´Ï´Ù.
[root@nextline apache_1.3.37]# make

 
¨ê ½ÇÁ¦ apache ¼³Ä¡¸¦ À§ÇÏ¿© make install¸¦ ½ÇÇàÇÕ´Ï´Ù.
[root@nextline apache_1.3.37]# make install


(5) GD ¼³Ä¡

¨ç ¾ÐÃàÇØÁ¦ ÇÑ gd-2.0.33 µð·ºÅ丮·Î À̵¿ÇÕ´Ï´Ù.
[root@nextline ~]#cd gd-2.0.33

¨è ÄÄÆÄÀÏÀ» Çϱâ À§ÇÑ È¯°æ¼³Á¤À» ÇÕ´Ï´Ù.
ÄÄÆÄÀÏ ¿É¼Ç
--prefix : ÇÁ·Î±×·¥ÀÌ ¼³Ä¡µÉ À§Ä¡¸¦ Àý´ë°æ·Î·Î ÁöÁ¤ÇÒ ¶§ »ç¿ëÇÏ´Â ¿É¼ÇÀÔ´Ï´Ù.
[root@nextline gd-2.0.33]# ./configure -–prefix=/usr/local/gd2


¨é ȯ°æ¼³Á¤ °úÁ¤ Áß png, jpeg, freetype, fontconfig, xpm, pthreads Á¤»ó ÀνĵǴÂÁö È®ÀÎÇÕ´Ï´Ù. [yes]¿Ü¿¡ [no]¹®±¸°¡ Ãâ·ÂµÇ¸é ÇØ´ç ¶óÀ̺귯¸®¸¦ ¼³Ä¡ÇÑ ÈÄ È¯°æ¼³Á¤À» ´Ù½Ã ÇÕ´Ï´Ù.

 
¨ê ÄÄÆÄÀÏÀ» Çϱâ À§ÇÏ¿© make¸¦ ½ÇÇàÇÕ´Ï´Ù.
[root@nextline gd-2.0.33]# make

 
¨ë gd¸¦ ½ÇÁ¦ ¼³Ä¡Çϱâ À§ÇÏ¿© make install¸¦ ½ÇÇàÇÕ´Ï´Ù.
[root@nextline gd-2.0.33]# make install

 
 (6) PHP ¼³Ä¡

¨ç ¾ÐÃàÇØÁ¦ ÇÑ php4-0STABLE-200701010530 µð·ºÅ丮·Î À̵¿ÇÕ´Ï´Ù.
[root@nextline ~]#cd php4-0STABLE-200701010530
 
[ÄÄÆÄÀÏ ¿É¼Ç]

--prefix=/usr/local/php
php ¼³Ä¡°æ·Î¸¦ ÁöÁ¤ÇÕ´Ï´Ù.

--with-apxs=/usr/local/apache/bin/apxs
°øÀ¯µÈ apache ¸ðµâÀ» ¿¬µ¿Çϱâ À§ÇÑ ¿É¼ÇÀÔ´Ï´Ù.

--with-config-file-path=/usr/local/lib
php¼³Á¤ÆÄÀÏ php.iniÆÄÀÏÀÌ Á¸ÀçÇÒ À§Ä¡¸¦ ÁöÁ¤ÇÕ´Ï´Ù.

--with-mysql=/usr/local/mysql
Mysql°ú ¿¬µ¿Çϱâ À§ÇÑ ¿É¼ÇÀÔ´Ï´Ù.

--with-gd=/usr/local/gd2
php¿¡¼­ gd¶óÀ̺귯¸®°ü·Ã ÇÔ¼ö¸¦ »ç¿ëÇÏ¿© gd¸¦ Áö¿øÇϱâ À§ÇÑ ¿É¼ÇÀÔ´Ï´Ù.

--enable-gd-native-ttf
GD ¶óÀ̺귯¸®¿¡¼­ FreeType¸¦ ÇÔÇÏ´Â ¿É¼ÇÀÔ´Ï´Ù.
 
–-with-freetype-dir=/usr
freetype2¸¦ Áö¿øÇϱâ À§ÇÑ ¿É¼ÇÀÔ´Ï´Ù.

--with-zlib
µ¥ÀÌÅ;ÐÃà ¶óÀ̺귯¸®·Î¼­ php¿¡¼­ zlibÀ» Áö¿øÇϱâ À§ÇÑ ¿É¼ÇÀÔ´Ï´Ù.

--with-iconv
ÀÎÄÚµù º¯È¯ÇÁ·Î±×·¥À¸·Î iconv¸¦ Áö¿øÇϱâ À§ÇÑ ¿É¼ÇÀÔ´Ï´Ù.

--with-imap
pop °ú ÇÔ²² ¸ÞÀϼö½Åµ¥¸óÀ¸·Î »ç¿ëµÇ´Â ¼­ºñ½º·Î¼­ imap¸¦ Áö¿øÇϱâ À§ÇÑ ¿É¼ÇÀÔ´Ï´Ù.

--with-kerberos
Kerberos´Â Ŭ¶óÀ̾ðÆ® ¼­¹ö ¾ÖÇø®ÄÉÀ̼ÇÀÇ ÀÔÁõÀ» Á¦°øÇϱâ À§ÇÏ¿© »óĪÀûÀÎ ¾ÏÈ£¹ýÀ» ÀÌ¿ëÇÏ´Â ³×Æ®¿öÅ© ÀÎÁõ ÇÁ·ÎÅäÄݷμ­ kerberos¸¦ Áö¿øÇϱâ À§ÇÑ ¿É¼ÇÀÔ´Ï´Ù.

--enable-mbstring
multi-byte¹®ÀÚ¸¦ Áö¿øÇϱâ À§ÇÑ ¿É¼ÇÀ¸·Î ¸¹Àº ¾ð¾î¸¦ Ç¥ÇöÇϱâ À§ÇÏ¿© ÀÌ¿ëµÇ¸ç, php¿¡¼­ mbstring¸¦ Áö¿øÇϱâ À§ÇÑ ¿É¼ÇÀÔ´Ï´Ù.

--enable-track-vars
HTTP_GET_VARS, HTTP_POST_VARS, HTTP_COOKIE_VARS ¹è¿­¿¡ µé¾îÀÖ´Â GET /
POST / cookie º¯¼öµéÀÌ ¾îµð·ÎºÎÅÍ ¿Ô´ÂÁö ±â¾ïÇÏ°Ô ¸¸µì´Ï´Ù. ÀÌ ¿É¼ÇÀº ´ÜÁö Default °ª À» Á¤ÇÏ´Â °Í»ÓÀ̸ç, ÈÄ¿¡ configuration fileÀÇ track_vars Áö½ÃÀÚ¿¡ ÀÇÇØ
Enable/Disable ÇÒ ¼ö ÀÖ½À´Ï´Ù.

--enable-ftp
php¿¡¼­ ftp°ü·Ã ÇÔ¼ö¸¦ Áö¿øÇϱâ À§ÇÑ ¿É¼ÇÀÔ´Ï´Ù.

--enable-debug
Zend Optimizer¸¦ »ç¿ëÇϱâ À§Çؼ­´Â debuggingÀ» »ç¿ëÇÏÁö ¾Ê½À´Ï´Ù.

[±×¿Ü ¿É¼Ç]

--enable-sockets
¼ÒÄÏ(socket) ÆÄÀÏÀ» »ç¿ëÇϱâ À§ÇÑ ¿É¼ÇÀÔ´Ï´Ù.

--with-language-korean
Çѱ¹¾î¸¦ »ç¿ëÇϱâ À§ÇÑ ¿É¼ÇÀÔ´Ï´Ù.

--enable-dba=shared
DBA¸¦ µ¿ÀûÀ¸·Î ÀûÀçÇÒ ¼ö ÀÖ´Â °øÀ¯ ¸ðµâ ÇüÅ·Π¸¸µå´Â ¿É¼ÇÀÔ´Ï´Ù.

--enable-gdbm[=DIR]
GDBM Áö¿øÀ» Æ÷ÇÔÇÏ´Â ¿É¼ÇÀÔ´Ï´Ù.

--enable-memory-limit
php¿¡¼­ ¸Þ¸ð¸® Á¦ÇÑ ±â´ÉÀ» Áö¿øÇÏ´Â ¿É¼ÇÀÔ´Ï´Ù.

¨è ÄÄÆÄÀÏÀ» Çϱâ À§ÇÏ¿© ȯ°æ¼³Á¤À» ÇÕ´Ï´Ù.
[root@nextline php4-0STABLE-200701010530]#
'./configure' '--prefix=/usr/local/php' '--with-apxs=/usr/local/apache/bin/apxs' '--with-config-file-path=/usr/local/lib' '--with-mysql=/usr/local/mysql' '--with-gd=/usr/local/gd2' '--enable-gd-native-ttf' '--with-freetype-dir=/usr' '--with-zlib' '--with-iconv' '--with-imap' '--with-imap-ssl' '--with-kerberos' '--enable-mbstring' '--enable-track-vars' '--enable-ftp' '--enable-debug'


¨é ÄÄÆÄÀÏÀ» Çϱâ À§ÇÏ¿© make¸¦ ½ÇÇàÇÕ´Ï´Ù.
[root@nextline php4-0STABLE-200701010530]#make


¨ê php¸¦ ½ÇÁ¦ ¼³Ä¡Çϱâ À§ÇÏ¿© make install¸¦ ½ÇÇàÇÕ´Ï´Ù.
[root@nextline php4-0STABLE-200701010530]#make install

 
¨ë php¼³Á¤ ÆÄÀÏÀ» º¹»ç ÇÕ´Ï´Ù.
[root@nextline php4-STABLE-200701010530]# cp php.ini-dist /usr/local/lib/php.ini


[vi ¿¡µðÅÍ »ç¿ë¹ý]

»ç¿ëÇü½Ä : vi [¿É¼Ç] [»ý¼ºÇÒ ÆÄÀϸí/ÆíÁýÇÒ ÆÄÀϸí]
 vi ¿¡µðÅÍ´Â ÀԷ¸ðµå, ¸í·É¸ðµå, ½ÇÇà¸ðµå·Î ±¸ºÐµË´Ï´Ù.

ÀԷ¸ðµå : vi ÆíÁýÈ­¸é¿¡¼­ ¹®ÀÚ¸¦ ÀÔ·ÂÇÒ ¼ö ÀÖ´Â ¸ðµå·Î¼­ ÀԷ¸ðµå·Î ÁøÀÔÇϱâ À§Çؼ­´Â i, a, o, I, A, O, RµîÀÌ ÀÖ½À´Ï´Ù. Áï Ãʱâ vi ÆíÁý±â ¸ðµå´Â ¸í·É¾î ¸ðµå·Î ÁøÀÔÀ» Çϱ⶧¹®¿¡ ¹®ÀÚ¸¦ ÀÔ·ÂÇϱâ Àü¿¡ ¾ÕÀÇ ´ÜÃàÅ°Áß Çϳª¸¦ ¸ÕÀú ÀÔ·ÂÇØ¾ß ¿øÇÏ´Â ¹®ÀÚ¸¦ ÀÔ·ÂÇÒ ¼ö ÀÖ½À´Ï´Ù.

¸í·É¸ðµå : Ä¿¼­À̵¿/¹®ÀÚ»èÁ¦/¹®ÀÚ(¿­)±³Ã¼/¹®ÀÚ¿­°Ë»ö µîÀ» ÇÒ¼ö ÀÖ´Â ¸ðµå·Î¼­ ÀԷ¸ðµå¿¡¼­ ÆíÁýÀÌ ¿Ï·áµÇ¸é EscÅ°¸¦ ´­·¯ ¸í·É¸ðµå·Î ÁøÀÔÇÏ¸é µË´Ï´Ù.

½ÇÇà¸ðµå : Ưº°ÇÑ ¸í·É¾î¸¦ ½ÇÇàÇÏ´Â ¸ðµå·Î¼­ ¸í·É¾î¸ðµå¿¡¼­ ":"(ÄÝ·Ð)¸¦ ´©¸£¸é vi È­¸é ÇÏ´Ü ÁÂÃø¿¡ vi Ư¼ö¸í·É¾î¸¦ ÀÔ·ÂÇÒ ¼ö ÀÖ½À´Ï´Ù.

½ÇÇà¸ðµåÀÇ ÀϹÝÀûÀ¸·Î ¾²À̴ Ư¼ö ¸í·É¾î
q : ¼öÁ¤ ÀÛ¾÷ÀÌ ÀÌ·ç¾îÁöÁö ¾ÊÀº »óÅ¿¡¼­ vi ÆíÁý±â¿¡¼­ ºüÁ®³ª¿É´Ï´Ù.
q! : ¼öÁ¤ ÀÛ¾÷ÀÌ ÀÌ·ç¾îÁø ºÎºÐÀ» Àû¿ë½ÃÅ°Áö ¾Ê°í vi ÆíÁý±â¸¦ °­Á¦·Î ºüÁ®³ª¿É´Ï´Ù.
w : ¼öÁ¤µÈ ÀÛ¾÷À» ÀúÀåÇÕ´Ï´Ù.
wq : ¼öÁ¤µÈ ÀÛ¾÷À» ÀúÀåÇÏ°í vi ÆíÁý±â¿¡¼­ ºüÁ®³ª¿É´Ï´Ù.
Ãʱ⠸í·É¾î¸ðµå -> ÀԷ¸ðµåÁøÀÔ -> ÆíÁý -> ¸í·É¾î¸ðµå -> ½ÇÇà¸ðµå -> Á¾·á

¨ì vi ¿¡µðÅ͸¦ ÀÌ¿ëÇÏ¿© httpd.conf ÆÄÀÏ¿¡ ¸ðµâÀÌ Á¤»óÀûÀ¸·Î ¿Ã¶ó°¬´ÂÁö È®ÀÎ ÇÕ´Ï´Ù.
[root@nextline php4-STABLE-200701010530]# vi /usr/local/apache/conf/httpd.conf

 
¨í LoadModule php4_module libexec/libphp4.so

 
 ¨î AddModule mod_php4.c

 
¨ï DirectoryIndex index.html index.php index.jsp index.htm


¨ð AddType application/x-httpd-php .php .php4 .php3


(7) ZendOptimizer ¼³Ä¡

¨ç ¾ÐÃàÇØÁ¦ÇÑ ZendOptimizer-2.6.0-linux-glibc21-i386 µð·ºÅ丮·Î À̵¿ÇÕ´Ï´Ù.
[root@nextline ~]# cd ZendOptimizer-2.6.0-linux-glibc21-i386

¨è install.sh¸¦ ½ÇÇàÇÕ´Ï´Ù.
[root@nextline ZendOptimizer-2.6.0-linux-glibc21-i386]# ./install.sh


¨é Zend Optimizer ȯ¿µ¸Þ½ÃÁö È­¸é ÀÔ´Ï´Ù. ¸¦ ¼±ÅÃÇÕ´Ï´Ù.


¨ê Zend Optimizer LICENSE È­¸éÀÔ´Ï´Ù. ¸¦ ¼±ÅÃÇÕ´Ï´Ù.


¨ë Zend Optimizer LICENSE µ¿ÀÇ È­¸éÀÔ´Ï´Ù. ¸¦ ¼±ÅÃÇÕ´Ï´Ù.


¨ì Zend ¼³Ä¡°æ·Î¸¦ ÁöÁ¤ÇÏ´Â È­¸éÀÔ´Ï´Ù. /usr/local/Zend(Àý´ë°æ·Î) È®ÀÎ ÈÄ ¸¦ ¼±ÅÃÇÕ´Ï´Ù.
Zend Optimizer ¼³Ä¡ °æ·Î°¡ ÀÚµ¿ ÁöÁ¤µÇÁö ¾ÊÀ» ½Ã ¼öµ¿À¸·Î /usr/local/Zend °æ·Î¸¦
ÁöÁ¤ÇØ ÁÖ½Ã¸é µË´Ï´Ù. (Linux OSÀÇ ÀÀ¿ëÇÁ·Î±×·¥Àº ±âº» /usr/local¿¡ ¼³Ä¡µÇ±â ¶§¹®¿¡
/usr/local/Zend·Î ÁöÁ¤ÇÕ´Ï´Ù.)


¨í php.iniÀÇ °æ·Î¸¦ ÁöÁ¤ÇÏ´Â È­¸éÀÔ´Ï´Ù. php¼³Ä¡ ½Ã php.ini ÆÄÀÏÀÌ /usr/local/lib¿¡
»ý¼ºµÇ±â ¶§¹®¿¡ /usr/local/lib(Àý´ë°æ·Î) ÁöÁ¤ ÈÄ ¸¦ ¼±ÅÃÇÕ´Ï´Ù.


¨î apaachectlÀÇ °æ·Î¸¦ ÁöÁ¤ÇÏ´Â È­¸éÀÔ´Ï´Ù. /usr/local/apache/bin/apachectl ÁöÁ¤ ÈÄ
¸¦ ¼±ÅÃÇÕ´Ï´Ù.


¨ï Zend Optimizer + Apache ¿¬µ¿ÇÒ °ÍÀÎÁö¸¦ ¹¯´Â È­¸éÀÔ´Ï´Ù. ¸¦ ¼±ÅÃÇÕ´Ï´Ù.


¨ð ¿¬µ¿ ÁøÇà È­¸éÀÔ´Ï´Ù.


¨ñ php.ini ÆÄÀÏÀÇ php.ini-zend_optimizer.bak ¹é¾÷ÆÄÀÏÀ» »ý¼ºÇÏ´Â È­¸éÀ̸ç, »ý¼ºÀ§Ä¡´Â php.ini ÆÄÀÏÀÌ Á¸ÀçÇÏ´Â /usr/local/lib °æ·Î¿¡ »ý¼ºµË´Ï´Ù. ¸¦ ¼±ÅÃÇÕ´Ï´Ù.


¨ò Zend Optimizer ¼³Ä¡¿Ï·á È­¸éÀÔ´Ï´Ù. ¸¦ ¼±ÅÃÇÕ´Ï´Ù.


¨ó apache Àç ½ÃÀÛÀ» ¹¯´Â È­¸éÀÔ´Ï´Ù. ¸¦ ¼±ÅÃÇÕ´Ï´Ù.


¨ô apache Àç ½ÃÀÛ ÁøÇà È­¸éÀÔ´Ï´Ù.


¨õ Apache Àç ½ÃÀÛ ¼º°ø ¸¦ ¼±ÅÃÇÕ´Ï´Ù.


(8) APM ¿¬µ¿ Å×½ºÆ® ¹× ¼³Á¤

[netstat ¸í·É¾î »ç¿ë¹ý]

¸®´ª½º¼­¹ö ¶ó¿ìÆÃÅ×À̺í È®Àΰú ³×Æ®¿÷ ¿¬°á »óŵîÀ» È®ÀÎÇÒ ¼ö ÀÖ´Â ¸í·É¾îÀÔ´Ï´Ù.
»ç¿ëÇü½Ä : netstat [¿É¼Ç]
-a ¿É¼Ç : --all °ú °°À¸¸ç listen µÇ´Â ¼ÒÄÏÁ¤º¸¿Í listen µÇÁö ¾Ê´Â ¼ÒÄÏÁ¤º¸ ¸ðµÎ¸¦ º¸¿©ÁÝ´Ï´Ù.
-n ¿É¼Ç : --numeric °ú °°À¸¸ç 10 Áø¼öÀÇ ¼öÄ¡Á¤º¸·Î °á°ú¸¦ Ãâ·Â ÇÕ´Ï´Ù.
-p ¿É¼Ç : --program °ú °°À¸¸ç ½ÇÇàµÇ°íÀÖ´Â °¢ ÇÁ·Î±×·¥°ú PID Á¤º¸¸¦ Ãâ·Â ÇÕ´Ï´Ù.
¡°|¡± ÆÄÀÌÇÁ : ¾ÕÀÇ netstat -anp ÇÑ °á°ú¸¦ ±×´ë·Î grep¿¡°Ô ³Ñ°ÜÁÖ´Â °Ì´Ï´Ù. grep´Â ¾î¶² ÆÐÅÏ¿¡ ¸Â´Â °ÍÀ» »Ì¾Æ³»´Â ¿ªÇÒÀ» ÁÖ·Î Çϴµ¥ ¾Õ¿¡¼­ ³Ñ¾î ¿Â netstat Á¤º¸Áß listenµÇ´Â ¼ÒÄÏÁ¤º¸¸¸ Ãâ·ÂÇÕ´Ï´Ù.

¨ç Æ÷Æ®°¡ Á¤»óÀûÀ¸·Î ¿Ã¶ó¿Í ÀÖ´ÂÁö È®ÀÎÇÕ´Ï´Ù.
[root@nextline ~]# netstat -anp | grep LISTEN
Apache ±âº»Æ÷Æ® : 80 Mysql ±âº»Æ÷Æ® : 3306


¨è ºÎÆýà apache, mysqlÀÌ ÀÚµ¿ ½ÃÀ۵ǵµ·Ï /etc/rc.d/rc.local¿¡ µî·ÏÇϱâ À§ÇÏ¿© vi ¿¡µðÅ͸¦ ÀÌ¿ëÇÏ¿© rc.localÆÄÀÏÀ» ¿±´Ï´Ù.
[root@nextline ~]# vi /etc/rc.d/rc.local


¨é apache, mysql ½ÃÀÛ ¸í·É¾î¸¦ Ãß°¡ÇÕ´Ï´Ù.
/usr/local/apache/bin/apachectl start
/usr/local/mysql/bin/mysqld_safe &


¨ê php Á¤º¸¸¦ È®ÀÎÇϱâ À§ÇÏ¿© vi ¿¡µðÅ͸¦ ÀÌ¿ëÇÏ¿© php_test.php ÆÄÀÏÀ» »ý¼ºÇÕ´Ï´Ù.
[root@nextline ~]# vi /usr/local/apache/htdocs/php_test.php


¨ë ¹®À» Ãß°¡ÇÕ´Ï´Ù.


¨ì http://ÇØ´çip/php_test.php È®ÀÎÈ­¸é
ÇØ´ç ip : apmÀÌ ¼³Ä¡µÈ ÇöÀç ¼­¹öÀÇ ip¸¦ ÀÔ·ÂÇÏ¿© Áֽñ⠹ٶø´Ï´Ù.
À¥ ºê¶ó¿ìÀú¿¡ À§ ÁÖ¼Ò¸¦ ÀÔ·ÂÇÏ½Ã¸é ¾Æ·¡ÀÇ È­¸éÀÌ ³ª¿À¸ç php, Zend, GD, Apache,
Mysql, ¶óÀ̺귯¸® µîÀÌ Á¤»óÀûÀ¸·Î ¿¬µ¿µÈ Á¤º¸¸¦ º¸¿©ÁÝ´Ï´Ù.


¨í phpinfo ÆäÀÌÁö ¿À·ùÈ­¸é
phpinfoÆäÀÌÁö°¡ Á¤»óÀûÀ¸·Î ³ª¿ÀÁö ¾Ê°í Äڵ尡 º¸À̰ųª ¾Æ¹«°Íµµ ³ªÅ¸³ªÁö ¾Ê´Â Áõ»óÀÌ »ý±â¸é /usr/local/apache/conf/httpd.confÆÄÀÏÀÇ ¼³Á¤ »óŸ¦ È®ÀÎÇÑ ÈÄ apache¸¦ Àç½ÃÀÛ ÇÏ¿© Àû¿ë½ÃÄÑ Áֽñ⠹ٶø´Ï´Ù.
¿À·ù1)

¿À·ù2)
  IIS ¼³Ä¡
  www ´ë¿ªÆø¼³Á¤





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