Install PECL Extensions in OpenVZ Debian Appliances

From Proxmox VE
Revision as of 04:31, 10 February 2011 by Apmuthu (talk | contribs) (Debian PHP5 PECL Extensions)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Installing PECL extensions in Debian

The Debian OpenVZ Templates for standard applications do not hae the development libraries installed mainly for security and secondary for distribution file size reasons.

Install Pre-requisites

apt-get install make
apt-get install php5-dev
apt-get install php-pear

phpize will get installed

PECL Syntax

Syntax for PECL Extension Installs

pecl install extname-ver

PECL Extension Install Example

pecl install uploadprogress-1.0.1

Will return:

update-alternatives: using /usr/bin/php-config5 to provide /usr/bin/php-config (php-config) in auto mode.
update-alternatives: using /usr/bin/phpize5 to provide /usr/bin/phpize (phpize) in auto mode.

Enable the PECL Extension in PHP5

Create the file /etc/php5/conf.d/uploadprogress.ini using

nano /etc/php5/conf.d/uploadprogress.ini

with the following contents

; configuration for php Upload Progress module
extension=uploadprogress.so

Activate the Extension

/etc/init.d/apache2 restart

Clean up

apt-get remove php5-dev
apt-get remove make