·Î±×ÀÎ | ȸ¿ø°¡ÀÔ | °í°´¹®ÀÇ
ÇÁ·Î±×·¡¹Ö°­Á > PHP °­ÁÂ
PEAR Write by [À̱ٻó]
- PEAR ¼Ò°³
- PEAR ¼³Ä¡

## PEAR ¼³Ä¡

±âº»ÀûÀ¸·Î PEAR Àº ¼³Ä¡µÇ¾î ÀÖÁö ¾Ê½À´Ï´Ù..
ÇÏÁö¸¸ °£´ÜÇÑ ¼³Ä¡ ¹æ¹ýÀ¸·Î PEAR ¸¦ ¼³Ä¡ÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù.

: Linux ½Ã½ºÅÛ¿¡¼­ÀÇ ¼³Ä¡

¼Ò½º ÄÄÆÄÀÏÀ» ÇØ¼­ ¼³Ä¡ ÇÏ¼Ì´Ù¸é ±âº»ÀûÀ¸·Î Æ÷ÇÔµÇ¾î ¼³Ä¡°¡ µË´Ï´Ù..

¸¸¾à ÄÄÆÄÀÏ ¿É¼Ç¿¡ --without-pear ¸¦ Ãß°¡ Çϼ̴ٸé PEAR ´Â ¼³Ä¡°¡ µÇ¾î ÀÖÁö ¾ÊÀ» °Í ÀÔ´Ï´Ù.

¼³Ä¡°¡ µÇ¾î ÀÖÁö ¾ÊÀ»¶§´Â lync ¸¦ ÀÌ¿ëÇÏ¿© ¼Õ ½±°Ô ¼³Ä¡ÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù.

[root@ns /]# lynx -source http://go-pear.org/ | php
ÀÌ·± ¸í·É¾î¸¦ »ç¿ëÇϽøé
Welcome to go-pear! Go-pear will install the 'pear' command and all the files needed by it. This command is your tool for PEAR installation and maintenance. Go-pear also lets you download and install the PEAR packages bundled with PHP: DB, Net_Socket, Net_SMTP, Mail, XML_Parser, phpUnit. If you wish to abort, press Control-C now, or press Enter to continue: HTTP proxy (http://user:password@proxy.myhost.com:port), or Enter for none:: Below is a suggested file layout for your new PEAR installation. To change individual locations, type the number in front of the directory. Type 'all' to change all of them or simply press Enter to accept these locations. 1. Installation prefix : /data/PHP_Tools/PHP4 2. Binaries directory : $prefix/bin 3. PHP code directory ($php_dir) : $prefix/lib/php 4. Documentation base directory : $php_dir/docs 5. Data base directory : $php_dir/data 6. Tests base directory : $php_dir/tests 1-6, 'all' or Enter to continue: The following PEAR packages are bundled with PHP: DB, Net_Socket, Net_SMTP, Mail, XML_Parser, phpUnit. Would you like to install these as well? [Y/n] : Loading zlib: ok Downloading package: PEAR.............ok Downloading package: Archive_Tar......ok Downloading package: Console_Getopt....ok Downloading package: XML_RPC..........ok Bootstrapping: PEAR...................(remote) ok Bootstrapping: Archive_Tar............(remote) ok Bootstrapping: Console_Getopt.........(remote) ok Downloading package: DB...............ok Downloading package: Net_Socket.......ok Downloading package: Net_SMTP.........ok Downloading package: Mail.............ok Downloading package: XML_Parser.......ok Downloading package: phpUnit..........ok Extracting installer..................ok sh: /usr/bin/cpp: No such file or directory install ok: PEAR 1.3b3 install ok: Archive_Tar 1.1 install ok: Console_Getopt 1.0 install ok: XML_RPC 1.0.4 install ok: DB 1.5.0RC2 install ok: Net_Socket 1.0.1 install ok: Net_SMTP 1.2.3 install ok: Mail 1.1.2 install ok: XML_Parser 1.0.1 warning : the following errors were found: invalid package version install ok: PHPUnit 1.0.0-alpha2 ** WARNING! Backed up old pear to /usr/local/bin/pear_old The 'pear' command is now at your service at /data/PHP_Tools/PHP4/bin/pear ** The 'pear' command is not currently in your PATH, so you need to ** use '/data/PHP_Tools/PHP4/bin/pear' until you have added ** '/data/PHP_Tools/PHP4/bin' to your PATH environment variable. Run it without parameters to see the available actions, try 'pear list' to see what packages are installed, or 'pear help' for help. For more information about PEAR, see: http://pear.php.net/faq.php http://cvs.php.net/co.php/pearweb/doc/pear_package_manager.txt?p=1 http://pear.php.net/manual/ Thanks for using go-pear!
¼³Ä¡ ¿Ï·á°¡ µÇ¸é PHP °¡ ¼³Ä¡µÈ µð·ºÅ丮ÀÇ bin µð·ºÅ丮·Î À̵¿Çؼ­
[root@ns bin]# ./pear list Installed packages: =================== Package Version State Archive_Tar 1.1 stable Console_Getopt 1.0 stable DB 1.5.0RC2 stable HTTP 1.2.1 stable Mail 1.1.2 stable Net_SMTP 1.2.3 stable Net_Socket 1.0.1 stable PEAR 1.3b3 beta PHPUnit 1.0.0-alpha2 alpha XML_Parser 1.0.1 stable XML_RPC 1.0.4 stable
È®ÀÎÇØ º¸½Ã¸é ¼³Ä¡ÇÑ ÆÐŰÁö¸¦ È®ÀÎÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù.
<? phpinfo(); ?>
¸¦ È®ÀÎÇϼż­ include_path ÀÇ Á¤º¸¿¡ /data/PHP_Tools/PHP4/lib/php ÀÌ·¸°Ô PEAR °¡ ¼³Ä¡µÈ µð·ºÅ丮 /data/PHP_Tools/PHP4/lib/php °¡ Æ÷ÇԵǾî ÀÖ³ª È®ÀÎÇØ Áֽñ⠹ٶø´Ï´Ù. : Windows ½Ã½ºÅÛ¿¡¼­ÀÇ ¼³Ä¡ Windows ½Ã½ºÅÛ¿¡¼­ÀÇ ¼³Ä¡ ¹æ¹ýÀº ¸Å¿ì °£´Ü ÇÕ´Ï´Ù. PHP °¡ ¼³Ä¡µÈ µð·ºÅ丮¿¡¼­ go-pear.bat ÆÄÀÏÀ» ½ÇÇà ½ÃÅ´À¸·Î¼­ ¼³Ä¡¸¦ ÇÏ½Ç ¼öÀÖ½À´Ï´Ù. ¸¸¾à APM_Setup À» »ç¿ëÁßÀ̽öó¸é C:\APM_Setup\Server\PHP4 µð·ºÅ丮¿¡¼­ go-pear.bat ÆÄÀÏÀ» ´õºíŬ¸¯ÇÏ¿© ½ÇÇà ½Ãŵ´Ï´Ù.
Welcome to go-pear! Go-pear will install the 'pear' command and all the files needed by it. This command is your tool for PEAR installation and maintenance. Go-pear also lets you download and install the PEAR packages bundled with PHP: DB, Net_Socket, Net_SMTP, Mail, XML_Parser, phpUnit. If you wish to abort, press Control-C now, or press Enter to continue: [Enter] HTTP proxy (http://user:password@proxy.myhost.com:port), or Enter for none:: [Enter] Below is a suggested file layout for your new PEAR installation. To change individual locations, type the number in front of the directory. Type 'all' to change all of them or simply press Enter to accept these locations. 1. Installation prefix : C:\APM_Setup\Server\PHP4 2. Binaries directory : $prefix 3. PHP code directory ($php_dir) : $prefix\pear 4. Documentation base directory : $php_dir\docs 5. Data base directory : $php_dir\data 6. Tests base directory : $php_dir\tests 7. php.exe path : C:\APM_Setup\Server\PHP4\cli\php.exe 1-7, 'all' or Enter to continue: [Enter] The following PEAR packages are bundled with PHP: DB, Net_Socket, Net_SMTP, Mail, XML_Parser, phpUnit. Would you like to install these as well? [Y/n] : [Enter] Loading zlib: ok Using local package: PEAR.............ok Using local package: Archive_Tar......ok Using local package: Console_Getopt....ok Using local package: XML_RPC..........ok Bootstrapping: PEAR...................(local) ok Bootstrapping: Archive_Tar............(local) ok Bootstrapping: Console_Getopt.........(local) ok Using local package: DB...............ok Using local package: Net_Socket.......ok Using local package: Net_SMTP.........ok Using local package: Mail.............ok Using local package: XML_Parser.......ok Downloading package: phpUnit..........ok Extracting installer..................ok install ok: PEAR 1.2.1 install ok: Archive_Tar 1.1 install ok: Console_Getopt 1.0 install ok: XML_RPC 1.0.4 install ok: DB 1.5.0RC1 install ok: Net_Socket 1.0.1 install ok: Net_SMTP 1.2.3 install ok: Mail 1.1.1 install ok: XML_Parser 1.0.1 install ok: PHPUnit 1.0.0-alpha2 ****************************************************************************** WARNING! The include_path defined in the currently used php.ini does not contain the PEAR PHP directory you just specified: If the specified directory is also not in the include_path used by your scripts, you will have problems getting any PEAR packages working. Would you like to alter php.ini ? [Y/n] : [Enter] php.ini include_path updated. Current include path : .;c:\php4\pear Configured directory : C:\APM_Setup\Server\PHP4\pear Currently used php.ini (guess) : c:\windows\php.ini Press Enter to continue: The 'pear' command is now at your service at C:\APM_Setup\Server\PHP4\pear.bat ** The 'pear' command is not currently in your PATH, so you need to ** use 'C:\APM_Setup\Server\PHP4\pear.bat' until you have added ** 'C:\APM_Setup\Server\PHP4' to your PATH environment variable. Run it without parameters to see the available actions, try 'pear list' to see what packages are installed, or 'pear help' for help. For more information about PEAR, see: http://pear.php.net/faq.php http://cvs.php.net/co.php/pearweb/doc/pear_package_manager.txt?p=1 http://pear.php.net/manual/ Thanks for using go-pear! * WINDOWS ENVIRONMENT VARIABLES * For convenience, a REG file is available under C:\APM_Setup\Server\PHP4\PEAR_ENV.reg . This file creates ENV variables for the current user. Double-click this file to add it to the current user registry.
PHP.INI ÆÄÀÏ¿¡´Â
;***** Added by go-pear include_path=".;C:\APM_Setup\Server\PHP4\pear" ;*****
ÀÇ ³»¿ëÀÌ Ãß°¡ µÇ°í PEAR_ENV.reg ÆÄÀÏÀÌ ´ÙÀ½°ú °°Àº ³»¿ëÀ¸·Î »ý¼º µË´Ï´Ù.
REGEDIT4 [HKEY_CURRENT_USER\Environment] "PHP_PEAR_SYSCONF_DIR"="C:\\APM_Setup\\Server\\PHP4" "PHP_PEAR_INSTALL_DIR"="C:\\APM_Setup\\Server\\PHP4\\pear" "PHP_PEAR_DOC_DIR"="C:\\APM_Setup\\Server\\PHP4\\pear\\docs" "PHP_PEAR_BIN_DIR"="C:\\APM_Setup\\Server\\PHP4" "PHP_PEAR_DATA_DIR"="C:\\APM_Setup\\Server\\PHP4\\pear\\data" "PHP_PEAR_PHP_BIN"="C:\\APM_Setup\\Server\\PHP4\\cli\\php.exe" "PHP_PEAR_TEST_DIR"="C:\\APM_Setup\\Server\\PHP4\\pear\\tests"
ÀÌÁ¦ PEAR_ENV.reg ¸¦ ´õºíŬ¸¯ÇÏ¿© ·¹Áö½ºÆ®¸®¸¦ ¾÷µ¥ÀÌÆ® ÇÕ´Ï´Ù. ÀÌÁ¦ PEAR ¼³Ä¡°¡ ¿Ï·áµÇ¾ú½À´Ï´Ù. ¾ÆÆÄÄ¡ ¼­¹ö¸¦ ´Ù½Ã ½ÇÇà ÇØÁֽøé PEAR °¡ Àû¿ë µË´Ï´Ù.
ÀÌÀü±Û PEAR ¼Ò°³
´ÙÀ½±Û ´ÙÀ½ °­Á°¡ ¾ø½À´Ï´Ù.
À̸ÞÀϹ«´Ü¼öÁý°ÅºÎ , ±¤°íÁ¦ÈÞ¹®ÀÇ , E-Mail, MSN : okstart@apmsetup.com