Search Our Database
How to install ImageMagick PHP extension on DirectAdmin custombuild in Centos 7
Introduction
ImageMagick is a versatile software suite for image manipulation and conversion, widely used in web development to dynamically create, edit, or convert bitmap images. Integrating ImageMagick with PHP allows server-side applications to manipulate images programmatically, making it essential for hosting providers and web servers offering dynamic image content. This guide provides step-by-step instructions to install the ImageMagick PHP extension on servers running DirectAdmin’s CustomBuild system in CentOS 7.
Prerequisites
- A server running CentOS 7 with DirectAdmin installed.
- CustomBuild tool configured within DirectAdmin.
- Root or sudo access to execute installation commands.
Step-by-Step Guide
Step 1: Navigate to the CustomBuild Directory
The first step involves accessing the CustomBuild directory to begin the installation process. Use the following command:
cd /usr/local/directadmin/custombuild
Step 2: Update CustomBuild
Updating CustomBuild ensures the latest settings and installation scripts are available. Execute the command:
./build update
Step 3: Enable ImageMagick Extension in CustomBuild
Next, configure CustomBuild to include the imagick PHP extension by setting it to “yes”:
./build set imagick yes
Step 4: Install ImageMagick
With the imagick setting enabled, proceed to install ImageMagick itself by running:
./build imagick
Step 5: Rebuild PHP to Apply Changes
To complete the integration of ImageMagick with PHP, rebuild PHP so that the changes take effect. Run the following command:
./build php n
This command ensures that the ImageMagick extension is successfully loaded and accessible to PHP applications.
Conclusion
By following these steps, the ImageMagick PHP extension has been successfully installed on a DirectAdmin server with CentOS 7, enabling dynamic image processing for PHP-based applications. Testing the installation by running a PHP script to verify ImageMagick functionality is recommended for confirmation.
Should you have any inquiries about the guidelines, please feel free to open a ticket through your portal account or contact us at support@ipserverone.com. We’ll be happy to assist you further.
Article posted on 22 February 2020