VPS侦探论坛

 找回密码
 注册
查看: 8476|回复: 0

[Apache] 進階使用PHP安裝PEAR

[复制链接]
发表于 2010-7-25 02:27:52 | 显示全部楼层 |阅读模式

[size=100%]安裝之前要確定你有lynx和php-cli兩套件。
[size=100%]# apt-get install lynx
[size=100%]# apt-get install php-cli

[size=100%]好了,有lynx和php-cli兩套件後,開始安裝PEAR。
[size=100%]# 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: MDB2.


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           : /usr
2. Binaries directory            : $prefix/bin
3. PHP code directory ($php_dir) : $prefix/share/pear
4. Documentation base directory  : $php_dir/docs
5. Data base directory           : $php_dir/data
6. Tests base directory          : $php_dir/tests
7. Temporary files directory     : $prefix/temp

#我有改了一些default值,prefix和php_dir。
1-7, 'all' or Enter to continue: all
Installation prefix [/usr] : /usr/share/php
Binaries directory [$prefix/bin] :
PHP code directory ($php_dir) [$prefix/share/pear] : /usr/share/php
Documentation base directory [$php_dir/docs] :
Data base directory [$php_dir/data] :
Tests base directory [$php_dir/tests] :
Temporary files directory [$prefix/temp] :

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           : /usr/share/php
2. Binaries directory            : $prefix/bin
3. PHP code directory ($php_dir) : /usr/share/php
4. Documentation base directory  : $php_dir/docs
5. Data base directory           : $php_dir/data
6. Tests base directory          : $php_dir/tests
7. Temporary files directory     : $prefix/temp

1-7, 'all' or Enter to continue:

The following PEAR packages are bundled with PHP: MDB2.
Would you like to install these as well? [Y/n] : Y

#下載進行安裝了...網路順利的話,很快就好了!
Loading zlib: ok
Downloading package: PEAR-stable......ok
Downloading package: Archive_Tar-stable....ok
Downloading package: Console_Getopt-stable....ok
Downloading package: Structures_Graph-stable....ok
Bootstrapping: PEAR...................(remote) ok
Bootstrapping: Archive_Tar............(remote) ok
Bootstrapping: Console_Getopt.........(remote) ok
Downloading package: MDB2.............ok
Extracting installer..................ok
warning: pear/PEAR requires package "pear/Archive_Tar" (version >= 1.3.1)
warning: pear/PEAR requires package "pear/Console_Getopt" (version >= 1.2)
warning: pear/PEAR requires package "pear/Structures_Graph" (version >= 1.0.2)
pear/PEAR can optionally use package "pear/XML_RPC" (version >= 1.4.0)
pear/PEAR can optionally use package "pear/PEAR_Frontend_Web" (version >= 0.5.0)
pear/PEAR can optionally use package "pear/PEAR_Frontend_Gtk" (version >= 0.4.0)
install ok: channel://pear.php.net/PEAR-1.6.0
install ok: channel://pear.php.net/Archive_Tar-1.3.2
install ok: channel://pear.php.net/Console_Getopt-1.2.3
install ok: channel://pear.php.net/Structures_Graph-1.0.2
install ok: channel://pear.php.net/MDB2-2.4.1
MDB2: Optional feature fbsql available (Frontbase SQL driver for MDB2)
MDB2: Optional feature ibase available (Interbase/Firebird driver for MDB2)
MDB2: Optional feature mysql available (MySQL driver for MDB2)
MDB2: Optional feature mysqli available (MySQLi driver for MDB2)
MDB2: Optional feature mssql available (MS SQL Server driver for MDB2)
MDB2: Optional feature oci8 available (Oracle driver for MDB2)
MDB2: Optional feature pgsql available (PostgreSQL driver for MDB2)
MDB2: Optional feature querysim available (Querysim driver for MDB2)
MDB2: Optional feature sqlite available (SQLite2 driver for MDB2)
MDB2: To install optional features use "pear install pear/MDB2#featurename"

The 'pear' command is now at your service at /usr/share/php/bin/pear

** The 'pear' command is not currently in your PATH, so you need to
** use '/usr/share/php/bin/pear' until you have added
** '/usr/share/php/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/pearwe ... age_manager.txt?p=1
http://pear.php.net/manual/

Thanks for using go-pear!

root@bullock-desktop:/usr/share#

最後別忘了把剛剛改的
[size=100%]/usr/share/php[size=100%]加到php.ini的inculde_path裡!very very important!
以上!
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-5-5 17:15 , Processed in 0.025756 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表