· KLDP.org · KLDP.net · KLDP Wiki · KLDP BBS ·
PhpRPM Install

PHP RPM ¼³Ä¡Çϱâ

¹®ÅÂÁØ 2006-08-22 16:14:55 http://tunelinux.pe.kr http://database.sarang.net



1. ¸®´ª½º¿¡¼­ apache

1.1. rpm ¼³Ä¡ÈÄ ÁÖÀÇ»çÇ×

  • Cent OS ±âº»¼³Ä¡¿Í ¿¬°üµÈ ³»¿ëÀÓ. ÇÁ·Î±×·¥¹öÀüÀº ´Þ¶óÁú°ÍÀÓ
  • httpd-2.0.52-19.ent.centos4 ±âº»ÇÁ·Î±×·¥¸¸ ÀÖÀ¸¸é µÊ. httpd-manual Àº Çѱ۸Ŵº¾óµµ Æ÷ÇԵǾî ÀÖÀ¸¸ç ¼­ºñ½º¿¡¼­´Â Á¦¿ÜÇϴ°ÍÀÌ ÁÁÀ» °ÍÀÓ.
  • /etc/httpd/conf/httpd.conf ÆÄÀÏÀÌ ±âº»¼³Á¤ÆÄÀÏÀ̸ç ÀÌ ÆÄÀÏ¿¡¼­ /etc/httpd/conf.d/ ÀÇ ÆÄÀϵéÀ» ÀоîµéÀÓ. /etc/httpd/conf.d/ ¿¡ ´Ù¸¥ ÇÁ·Î±×·¥°ú ¿¬°üµÈ ÆÄÀÏÀ» ³Ö¾î ±âº»¼³Á¤°ú ºÐ¸®ÇÏ¿© °ü¸®¸¦ ÆíÇÏ°Ô Çϵµ·Ï µÇ¾îÀÖÀ½. ÀÌ µð·ºÅ丮¿¡¼­ welcome.conf ´Â 403 ¿¡·¯½Ã /var/www/error/noindex.html ·Î °¡µµ·Ï µÇ¾îÀÖÀ¸¸ç Cent OS Test Page ¸¦ º¸¿©ÁÜ. ¼­ºñ½ºÇÏ´Â °æ¿ì¿¡´Â welcome.conf ¸¦ ¾Æ¿¹ Á¦¿ÜÇÏ´Â °ÍÀÌ ÁÁÀ» °ÍÀÓ.
[root@localhost conf]# vi httpd.conf
    194 Include conf.d/*.conf
[root@localhost conf]# ls /etc/httpd/conf.d/
perl.conf  php.conf  python.conf  README  ssl.conf welcome.conf

[root@intranet conf.d]# cat welcome.conf
#
# This configuration file enables the default "Welcome"
# page if there is no default index page present for
# the root URL.  To disable the Welcome page, comment
# out all the lines below.
#
<LocationMatch "^/+$">
    Options -Indexes
    ErrorDocument 403 /error/noindex.html
</LocationMatch>

1.2. php ¿¬µ¿

  • php yum À¸·Î ¼³Ä¡Çϸé /etc/httpd/conf.d/php.conf ¿¡ apache ¼³Á¤³»¿ëÀÌ µé¾î°¡°í php ¼³Á¤³»¿ëÀº /etc/php.ini ¿¡ µé¾î°¨. Ãß°¡ÇÏ´Â php ¸ðµâ(extention)Àº /etc/php.d/ µð·ºÅ丮·Î µé¾î°¨
  • mysql Àº php-mysql yum À¸·Î ¼³Ä¡ÇÏ¿© ¿¬µ¿ÇÔ
[root@localhost log]# ls /etc/php.d/
ldap.ini  mysql.ini

[root@localhost php.d]# cat /etc/php.d/mysql.ini
; Enable mysql extension module
extension=mysql.so
  • ldap Àº php-ldap À» ÀÌ¿ëÇÏ¿© ¿¬µ¿ÇÔ
[root@localhost php.d]# rpm -ql php-ldap
/etc/php.d/ldap.ini
/usr/lib/php4/ldap.so

[root@localhost php.d]# cat /etc/php.d/ldap.ini
; Enable ldap extension module
extension=ldap.so

1.3. PHP srpm ÀÌ¿ëÇÏ¿© ¼³Ä¡Çϱâ

ÇÁ·Î±×·¥ÀÇ °ü¸®¸¦ À§ÇÏ¿© °¡±ÞÀû rpmÀ» ÀÌ¿ëÇÏ¿© »ç¿ëÇÏ´Â °ÍÀÌ ÁÁ´Ù. ÀÌ°æ¿ì srpmÀ» ÀÌ¿ëÇÏ¿© ÇÊ¿äÇÑ ¿É¼ÇÀ» Á¶±Ý¾¿ ¹Ù²ã¼­ ¾²¸é µÈ´Ù. CentOS¿¡´Â mysql 4.x °¡ ¼³Ä¡µÇ¾îÀÖ´Ù. mysqlÀº mysql »çÀÌÆ®¿¡¼­ ´Ù¿î·Îµå¹Þ¾Æ »ç¿ëÀ» ÇÑ´Ù°í ÇÏ´õ¶óµµ php¿¬µ¿ÀÌ °É¸°´Ù. ÀÌ°æ¿ì¿¡ ¸ÕÀú mysql 5.x ¸¦ mysql »çÀÌÆ®¿¡¼­ ´Ù¿î·Îµå¹Þ¾Æ 5.x·Î ¹Ù²Û´Ù. ¿©±â¼­ Áß¿äÇÑ°ÍÀº devel ÆÐÅ°Áö¸¦ ¹Ýµå½Ã ¼³Ä¡ÇØ¾ß srpm À¸·Î ºôµå°¡ °¡´ÉÇÏ´Ù. ¹°·Ð php¸¦ ¼Ò½º¼³Ä¡·Î ÇÒ °æ¿ì¿¡µµ devel ÆÐÅ°Áö´Â ÇÊ¿äÇÏ´Ù.

¸ÕÀú CentOS »çÀÌÆ®¿¡¼­ °¡Àå ÃÖ½ÅÀÇ php srpm ¹öÀüÀ» ¹Þ´Â´Ù. 2006-09-08 16:04:16 ÇöÀç °¡Àå ÃֽŠ¹öÀüÀº php-4.3.9-3.15.src.rpm ÀÌ´Ù.
  • ¹öÀü°úÀÇ ±¸º°À» À§ÇÏ¿© spec ÆÄÀÏÀ» ¼öÁ¤ÇÑ´Ù. Release ÀÇ 3.15 µÚ¿¡ .samjungÀ» Ãß°¡ÇÏ¿´´Ù.
  • rpmbuild ¸í·ÉÀ» ½ÇÇàÇϸé rpmÀ» ¸¸µç´Ù. ¿©±â¿¡ --target i686 ¿É¼ÇÀ» ÁÖ¸é i686¿ëÀ¸·Î ÃÖÀûÈ­°¡ µÈ´Ù. -ba ¿É¼ÇÀº rpm, srpmÀ» ÇÔ²² ¸¸µå´Â °ÍÀÌ´Ù.
  • rpmbuild ¸í·ÉÀ» ³»¸®¸é ¿¬°ü¼ºÀÖ´Â ÆÐÅ°Áö¸¦ ¼³Ä¡Ç϶ó´Â ¸»ÀÌ ³ª¿À¸ç yum À» ÀÌ¿ëÇÏ¿© ¼³Ä¡Çϸé ÀÚµ¿À¸·Î ÀÇÁ¸¼ºÀ» °Ë»çÇØÁØ´Ù.
  • ¸¸µé¾îÁø ÇÁ·Î±×·¥À» °¡Áö°í ¼³Ä¡ÇÏ¸é µÈ´Ù.
  • ¿©±â¼­´Â srpm ÀÇ Release ¸¸ ¹Ù²Ù±â ¶§¹®¿¡ °úÁ¤ÀÌ º¹ÀâÇÏÁö´Â ¾Ê´Ù.
# rpm -ivh php-4.3.9-3.15.src.rpm 
# cd /usr/src/redhat/SPECS/
# vi php.spec
      9 Release: 3.15.samjung
# rpmbuild -ba php.spec
# ls /usr/src/redhat/RPMS/i386/
php-4.3.9-3.15.samjung.i386.rpm            php-imap-4.3.9-3.15.samjung.i386.rpm      php-odbc-4.3.9-3.15.samjung.i386.rpm
php-debuginfo-4.3.9-3.15.samjung.i386.rpm  php-ldap-4.3.9-3.15.samjung.i386.rpm      php-pear-4.3.9-3.15.samjung.i386.rpm
php-devel-4.3.9-3.15.samjung.i386.rpm      php-mbstring-4.3.9-3.15.samjung.i386.rpm  php-pgsql-4.3.9-3.15.samjung.i386.rpm
php-domxml-4.3.9-3.15.samjung.i386.rpm     php-mysql-4.3.9-3.15.samjung.i386.rpm     php-snmp-4.3.9-3.15.samjung.i386.rpm
php-gd-4.3.9-3.15.samjung.i386.rpm         php-ncurses-4.3.9-3.15.samjung.i386.rpm   php-xmlrpc-4.3.9-3.15.samjung.i386.rpm
# ls /usr/src/redhat/SRPMS/
php-4.3.9-3.15.samjung.src.rpm
# yum remove php
# rpm -ivh php-4.3* php-mysql-*
  • À§¿¡¼­ ¸¸µç rpmÀº Àӽ÷Πintranet ¼­¹öÀÇ /root/program/php ¿¡ ÀÖ´Ù. /root/program/mysql/ ¿¡´Â MySQL rpmÀÌ µé¾îÀÖ´Ù.

ID
Password
Join
You are scrupulously honest, frank, and straightforward.


sponsored by andamiro
sponsored by cdnetworks
sponsored by HP

Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2006-10-04 11:35:17
Processing time 0.0046 sec