Ubuntu 12.1 independently installs the PHP extension library, ubuntu12.1php
Ubuntu is a very good system in the Linux field. It is very common to install PHP. How to install the PHP extension library independently?
The procedure is as follows:
1. Enter the php source package ext; (here PHP version php-5.4.37, the extension package gd library example)
Zy @ zy-virtual-machine :~ /Temp/php-5.4.37/ext $ cd gd
2. Use the phpize tool to generate the configure script file
Zy @ zy-virtual-machine :~ /Temp/php-5.4.37/ext/gd $ sudo phpize
3. Compile the extension package according to the normal compilation method.
$./Configure $ make # make install
NOTE: If multiple PHP files are installed, You need to specify which PHP file to compile. For example:
./Configure -- with-php-config =/usr/local/lib/php/extensions
In addition, make will generate gd in the source package/ext/gd/modules. so library, you can choose not to execute make install, manually copy gd. so to the required path.
Reference: http://php.net/manual/zh/install.pecl.phpize.php