1, first into the PHP decompression source package, find the extension module to install the directory. (This example is to install the ZIP expansion module)
[Email protected] home]# cd/usr/local/src/php-5.6.13/ext/zip/
Run the Phpize program under the Zip directory with an absolute path, the Zip Configure program is automatically generated and can be seen under the zip directory.
[Email protected] zip]#/usr/local/php/bin/phpize
Configuring for:
PHP Api version:20131106
Zend Module Api no:20131226
Zend Extension Api no:220131226
2. Compile and install
[Email protected] zip]#/configure--with-php-config=/usr/local/php/bin/php-config; make; Make install
After performing the Make install screen, you will be prompted to zip.so the path and copy it to the PHP extensions directory.
Installing Shared extensions:/usr/local/php/lib/php/extensions/no-debug-non-zts-20131226/
3. Modify the php.ini file
[Email protected] zip]# Vim/usr/local/php/php.ini
Then add a new line:
Extension=zip.so
4, restart PHP-FPM can be effective.
[Email protected] zip]#/etc/init.d/php-fpm restart
The installation method of other modules is basically the same as this, whether it is PHP's own extension module or the third-party extension modules are installed in this way.
This article is from the "Tomorrow Inspiration" blog, make sure to keep this source http://coolner.blog.51cto.com/957576/1960956
PHP Installation Module