PHP
Install PHP Modules via PECL
by sudo on Jan.13, 2010, under Apache, PHP
First, mount the /tmp partition with exec permissions.
mount -o remount,exec /tmp
To install a package via pecl, run the following.
pecl install ssh2
(If the package is in a state other than stable, append the state after the package name ‘pecl install ssh2-beta’)
Last few lines of the module install will list the location of the library, usually /usr/lib/php/modules. Create a ini file with the module name within /etc/php.d/ with the extension directive.
# cat /etc/php.d/gd.ini
; Enable gd extension module
extension=gd.so
At this point, run the mount command to reestablish noexec for the /tmp partition.
mount -o remount,noexec /tmp
Gracefully restart apache and you are done.