wget http://pear.php.net/go-pear
- PHP go_pear
[Root@localhost ~]# php go-pear
- Welcome to go-pear!
Go-pear'll install the ' pear ' command and all of the files needed by
- It. This command was your tool for PEAR installation and maintenance.
Go-pear also lets you download and install the following optional pear
- Packages:pear_frontend_web-beta, Pear_frontend_gtk2, MDB2.
If you wish to abort, press control-c now, or presses Enter to continue:
HTTP Proxy (Http://user:password@proxy.myhost.com:port), or Enter for none::
Below is a suggested the 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 ($prefix):/root
- 2. Temporary files directory: $prefix/temp
- 3. Binaries Directory: $prefix/bin
- 4. PHP Code directory ($php _dir): $prefix/pear
- 5. Documentation Base directory: $php _dir/docs
- 6. Data Base directory: $php _dir/data
- 7. Tests Base directory: $php _dir/tests
1-7, ' all ' or Enter to continue:
Copy CodeYou can choose: 1 to set your installation path. Next, you can complete the installation by going to the carriage return. Now you can run it directly: pecl Pear 2 commands to install. What is: Pear pecl? Pear and pecl are all collections of PHP extensions. There are two ways to extend PHP: one is to write functions and classes in pure PHP code. Pear is such a project. Pear is the official open source class library for PHP (the abbreviation for PHP Extension and application repository). Pear is the meaning of pears in English. Pear the PHP program development process commonly used in the function of writing into a class library, covering the page surface, database access, file operations, data structure, caching operations, network protocols and many other aspects, users can be very convenient to use. It is a PHP extension and application of a code warehouse, in short, pear is the PHP cpan. Its homepage is pear.php.net. The other is to use C or C + + to write external modules loaded into PHP. Pecl (The PHP Extension Community Library) is doing this, PHP's standard extension, which complements the functionality needed in real-world development. All extensions need to be installed, appearing as DLLs under Windows, and compiled separately under Linux, in the form of C in accordance with the official PHP standard, although the source code is open but the average person cannot change the source code at will. Its homepage is pecl.php.net. The most straightforward statement: Pear is the upper-level extension of PHP, PECL is the underlying extension of PHP. Both of these methods actually provide ready-made functions or classes for a particular application, essentially the same. Know the above 2 differences, for our installation is very convenient to understand. Our general so file extension needs to be run: pecl 2. Below, install a: pecl_http extension test
- [root@localhost ~]# pecl Search http
- Retrieving data ... 0%
- Matched packages, channel Pecl.php.net:
- =======================================
- Package stable/(Latest) Local
- Pecl_http 1.7.0 (Stable) Extended HTTP Support
- You have new mail in/var/spool/mail/root
- [root@localhost ~]# pecl Install Pecl_http
- Downloading pecl_http-1.7.0.tgz ...
- Starting to download pecl_http-1.7.0.tgz (173,979 bytes)
- .... done:173,979 bytes, ....., .....??????????????.
- Building source files,
- Running:phpize
- Configuring for:
- PHP Api version:20041225
- Zend Module Api no:20060613
- Zend Extension Api no:220060519
- Whether to enable CURL HTTP requests; Specify Libcurl directory [Yes]:
Copy CodeRun First: The search command is fuzzy and can then be used, pecl install pecl_http. All the way to the return, a moment in: [Root@localhost ~]# ll/usr/lib/php/modules/http.so- rw-r--r--1 root root 1274476 06-26 08:56/usr/lib/php/modules/http.so has its own module. (different system, the location may be different), the previous step after the installation, will tell the module where the address. 3. Compounding php.ini join: extension=http.so is OK. Then, you can view it through the php-m.
- [Root@localhost ~]# Php-m
- [PHP Modules]
- bz2
- Calendar
- CType
- Curl
- Date
- dBASE
- Dom
- Eaccelerator
- Exif
- Filter
- Ftp
- Gd
- GetText
- Gmp
- Hash
- http
Copy Codehas been successfully installed. PostScript: Other also has source installation, on pecl.php.net find the corresponding source package decompression. Can be through: pecl Install source files. |