Install PHP Libraries on a CentOS

There are several ways to install PHP Libraries that your installation can utilize on a VPS or Dedicated server. Some of them are available via YUM and others could be installed using PHP PEAR or PECL. There are several famous PHP Libraries and we will their installation.

One thing to notice is that many of those libraries and extensions are available for multiple PHP versions on any Shared Hosting Package that you can have with us, they’re available through:

cPanel -> Select PHP Version -> Select Extensions -> Save

Install PHP Libraries on a CentOS VPS or Dedicated Server

To start off we’ll need PEAR and PECL’s functionality, you can install it using the following line after you’ve logged to your VPS or Dedicated server via SSH:

Install PEAR and PECL

yum install php-pear

Install php-gd

yum install php-gd

Install imagemagick

pecl install imagick

After this, we’ll need to configure php.ini to also utilize imagick, let’s find out the location of php.ini

php -i | grep "Loaded Configuration File =>"

Then append the imagick extension at the bottom:

echo "extension=imagick.so" >> /location/to/php.ini

Install PHP Packages with PEAR

You can look up any desired extension from their official repository at https://pecl.php.net/packages.php after that simply run the command:

pecl install desiredExtension

Do not forget to add the installed extension in your php.ini in the same way as above

echo "extension=newlyInstalled.so" >> /location/to/php.ini
  • 0 Kunder som kunne bruge dette svar
Hjalp dette svar dig?

Relaterede artikler

CentOS Web Panel Review – Introduction

CentOS Web Panel is a hosting control panel which centres around easy and quick management of the...

How to install FFmpeg on your VPS / Dedicated Server

In this tutorial we will show you how to install FFmpeg on your VPS/dedicated server running on...

How to terminate accounts on my Dedicated Server?

In this article we will show you an easy and efficient way to terminate accounts from your...

How to suspend / unsuspend accounts on my Dedicated Server?

As customers come and go, you might have various reasons to suspend or unsuspend accounts. So,...

Is Microsoft Exchange supported on my Dedicated Server?

All of our servers, including the Dedicated ones, are Linux-based. Microsoft Exchange is a...

Powered by WHMCompleteSolution