Introduction
While the WHM and the cPanel interface allow for installing PEAR packages, sometimes there are tasks that are easier performed via the command-line or you may need to use additional options or flags during installation that the interface does not provide.
Procedure
To install PEAR modules via the command line, please be sure to log in as the user that you intend to use these as.
Once logged in as the desired user, specify the full path to the cPanel provided PEAR package (or if the server has CloudLinux, use the CloudLinux ALT-PHP path).
/opt/cpanel/ea-php70/root/usr/bin/pear install $MODULE_NAME
/opt/cloudlinux/alt-php70/root/usr/bin/pear install $MODULE_NAME
In the example above, we are using PHP 70 to manage the installation of PEAR modules.