¸ñÇ¥ : PHP3 ¸ðµâÀ» Æ÷ÇÔ ¾ÆÆÄÄ¡¸¦ ÄÄÆÄÀÏ, ¼³Ä¡ ÇÑ´Ù
1. ÃֽŹöÀüÀÇ PHP3 ¸¦ ´Ù¿î ¹Þ´Â´Ù. (º» ¹®¼´Â 3.0.6 ±âÁØ)
htpp://www.php.net
2. Àӽ÷ΠǮ¾îµÐ ¾ÆÆÄÄ¡ÀÇ src µð·ºÅ丮·Î À̵¿ÇÑ´Ù.
[src]# cd /tmp/apache/src/
3. Configuration ÈÀÏÀ» ¿°í ÀûÀýÇÑ °÷¿¡ ¾Æ·¡ºÎºÐÀ» Ãß°¡ ÇÕ´Ï´Ù.
AddModule modules/php3/libphp3.a
4. º¯°æµÈ ¼³Á¤ÀÌ Àû¿ëµÇµµ·Ï ./Configure ¸¦ ½ÇÇàÇÕ´Ï´Ù.
[src]# ./Configure
Using config file: Configuration
Creating Makefile
+ configured for Linux platform
+ setting C compiler to gcc
+ setting C pre-processor to gcc -E
+ checking for system header files
+ adding selected modules o php3_module
uses ConfigStart/End /*
ÃàÇÏÇÕ´Ï´Ù.! PHP3 ¸ðµÑÀ» ã¾Æ³Â½À´Ï´Ù */
+ doing sanity check on compiler and options
Creating Makefile in support
Creating Makefile in main
Creating Makefile in ap
Creating Makefile in regex
Creating Makefile in os/unix
Creating Makefile in modules/standardÀÚ
Creating Makefile in modules/php3
5. ÀÚ ÀÌÁ¦ make ¸¦ ÇÕ´Ï´Ù.
[src]# make
6. ¾ÆÆÄÄ¡ µ¥¸óÀÌ ¸¸µé¾î Á³³ª »ìÆì º¸°Ú½À´Ï´Ù.
[src]# ls -al httpd
-rwxr-xr-x 1 root root 1831174
Jan 26 10:36 httpd
ÈÀÏÅ©±â´Â ¼±ÅÃÇÑ ¸ðµâ¿¡ µû¶ó ´Ù¸¦ ¼ö ÀÖ½À´Ï´Ù
7. ÀÌÁ¦ ¾ÆÆÄÄ¡ µð·ºÅ丮¸¦ /usr/lcoal/apache ·Î ¿Å±â°Ú½À´Ï´Ù.
[src]# cd /tmp
[/tmp]# mv ./apache/ /usr/local/apache/
8. ÀÚ ÀÌÁ¦ ¿©·¯ºÐÀÇ ¼¹ö¿¡ ¾Ë¸Â°Ô conf ÈÀÏÀ» ¼öÁ¤ÇÕ´Ï´Ù. ÀÏ´Ü ¹èÆ÷º»¿¡
µû¶ó¿Â 3°³ÀÇ ¼³Á¤ÈÀÏÀ» º¹»çÇÕ´Ï´Ù.
[conf]# cd /usr/local/apache/conf
[conf]# cp httpd.conf-dist httpd.conf
[conf]# cp srm.conf-dist srm.conf
[conf]# cp access.conf-dist access.conf
httpd.conf ¿¡¼´Â ´ÙÀ½À» °íÄ¡¼¼¿ä
ServerAdmin you@your.address // °ü¸®ÀÚ Email
ServerRoot "@@ServerRoot@@" // ¾ÆÆÄÄ¡ base µð·ºÅ丮
¿©±â¼´Â "/usr/local/apache"
ServerName new.host.name //
À¥¼¹ö À̸§
srm.conf ¿¡¼´Â ´ÙÀ½Ã³·³ °íÄ¡¼¼¿ä
DocumentRoot "/usr/local/apache/htdocs"
Alias /icons/ "/usr/local/apache/icons/"
ScriptAlias /cgi-bin/ "/usr/local/apache/cgi-bin/"
AddType application/x-httpd-php3 .phtml
AddType application/x-httpd-php3 .html # <- Ãß°¡ Çϼ¼¿ä
AddType application/x-httpd-php3 .htm # <- Ãß°¡ Çϼ¼¿ä
AddType application/x-httpd-php3-source .phps
access.conf ¿¡¼´Â ´ÙÀ½Ã³·³ °íÄ¡¼¼¿ä
@ServerRoot@ -> /usr/lcoal/apache/
9. ¸ðµÎ Á¦´ë·Î °íÃÆÀ¸¸é ÀÌÁ¦ À¥¼¹ö¸¦ ¶ç¿ì°Ú½À´Ï´Ù.
[conf]# cd ..
[apache]# ./src/httpd
-f ¿É¼ÇÀ¸·Î ¼³Á¤ÈÀÏÀ» ÁöÁ¤Çؼ ´ÙÀ½Ã³·³ ¶ç¿ï¼öµµ ÀÖ½À´Ï´Ù.
[apache]# /usr/local/apache/src/httpd -f /usr/local/apache/conf/httpd.conf
10. ¾ÆÆÄÄ¡ µ¥¸óÀÌ ¶° ÀÖ³ª È®ÀÎÇØ º¸¼¼¿ä.
[apache]# ps -xa | grep httpd 357 ? S
0:00 /usr/local/apache/sbin/httpd 358
? S 0:00 /usr/local/apache/sbin/httpd
359 ? S 0:00 /usr/local/apache/sbin/httpd
360 ? S 0:00 /usr/local/apache/sbin/httpd
361 ? S 0:00 /usr/local/apache/sbin/httpd
387 ? S 0:00 /usr/local/apache/sbin/httpd
11. ÀÌÁ¦ ¸¶Áö¸· ´Ü°èÀÔ´Ï´Ù.
À¥ºê¾Æ¿ìÀú¸¦ ¶ç¿ì°í http://localhost ¿¡ ¿¬°áÇØ º¾´Ï´Ù "It Worked!
The Apache Web Server is Installed on this Web Site! "
¶ó´Â ¸Þ½ÃÁö°¡ ³ª¿À¸é ¼º°øÀÔ´Ï´Ù.
12. PHP3 °¡ ÀÛµ¿Çϳª »ìÆì º¾½Ã´Ù.
/usr/local/apache/htdocs/ ¿¡ phptest.html À̶ó´Â ÈÀÏÀ»
¸¸µé°í ´ÙÀ½À» ÀÔ·ÂÇϼ¼¿ä. <html> <?php
phpinfo() ;
?> </html>
13. ´Ù½Ã À¥ºê¶ó¿îÀú¿¡¼ phptest.html À» º¸¼¼¿ä.
¿©·¯ºÐÀÇ ¼¹ö Á¤º¸°¡ ÁÖ¿í ³ª¿À¸é ´ë¼º°øÀÔ´Ï´Ù.
|
|