pearというのは簡単にいってしまえば、phpの追加機能群。
phpをインストールしただけでは足りない機能をpearによってインストールすることができるわけです。たぶん。
■ pearのダウンロード
まず、以下のページからgo-pear.pharをダウンロードします。
http://pear.php.net/manual/en/installation.getting.php
Introduction
■ pearのインストール
インストールするサーバにgo-pear.pharをアップロード
そして以下を実行!
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
$ php go-pear.phar 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 base ($prefix) : /home/user/pear 2. Temporary directory for processing : /tmp/pear/install 3. Temporary directory for downloads : /tmp/pear/install 4. Binaries directory : /home/user/pear/bin 5. PHP code directory ($php_dir) : /home/user/pear/share/pear 6. Documentation directory : /home/user/pear/docs 7. Data directory : /home/user/pear/data 8. User-modifiable configuration files directory : /home/user/pear/cfg 9. Public Web Files directory : /home/user/pear/www 10. Tests directory : /home/user/pear/tests 11. Name of configuration file : /home/user/.pearrc 1-11, 'all' or Enter to continue: Beginning install... Initialized registry... Preparing to install... installing phar:///home/user/go-pear.phar/PEAR/go-pear-tarballs/Archive_Tar-1.3.7.tar... installing phar:///home/user/go-pear.phar/PEAR/go-pear-tarballs/Console_Getopt-1.3.0.tar... installing phar:///home/user/go-pear.phar/PEAR/go-pear-tarballs/PEAR-1.9.4.tar... installing phar:///home/user/go-pear.phar/PEAR/go-pear-tarballs/Structures_Graph-1.0.4.tar... installing phar:///home/user/go-pear.phar/PEAR/go-pear-tarballs/XML_Util-1.2.1.tar... install ok: channel://pear.php.net/Archive_Tar-1.3.7 install ok: channel://pear.php.net/Console_Getopt-1.3.0 install ok: channel://pear.php.net/Structures_Graph-1.0.4 install ok: channel://pear.php.net/XML_Util-1.2.1 install ok: channel://pear.php.net/PEAR-1.9.4 PEAR: Optional feature webinstaller available (PEAR's web-based installer) PEAR: Optional feature gtkinstaller available (PEAR's PHP-GTK-based installer) PEAR: Optional feature gtk2installer available (PEAR's PHP-GTK2-based installer) PEAR: To install optional features use "pear install pear/PEAR#featurename" ****************************************************************************** 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] : ****************************************************************************** WARNING: Cannot write to /etc/php.ini, but php.ini was successfully created at . Please replace the file with or modify your php.ini by adding: include_path=".:/home/user/pear/share/pear:/php/includes:/home/user/lib" Current include path : .:/php/includes:/home/user/lib Configured directory : /home/user/pear/share/pear Currently used php.ini (guess) : /etc/php.ini Press Enter to continue: ** WARNING! Old version found at /home/user/pear/bin, please remove it or be sure to use the new /home/user/pear/bin/pear command The 'pear' command is now at your service at /home/user/pear/bin/pear ** The 'pear' command is not currently in your PATH, so you need to ** use '/home/user/pear/bin/pear' until you have added ** '/home/user/pear/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://pear.php.net/manual/ Thanks for using go-pear! |
■ DBライブラリをインストール!
1 2 3 4 5 6 7 |
$ ./pear/bin/pear install DB WARNING: "pear/DB" is deprecated in favor of "pear/MDB2" WARNING: channel "pear.php.net" has updated its protocols, use "pear channel-update pear.php.net" to update downloading DB-1.7.14.tgz ... Starting to download DB-1.7.14.tgz (133,103 bytes) .............................done: 133,103 bytes install ok: channel://pear.php.net/DB-1.7.14 |
/