Learn how to effortlessly install ImageMagick software on Rocky Linux 9 with our detailed step-by-step guide. Enhance your image processing capabilities and unlock creative potential today! #centlinux #linux #imagemagick #imagick
ImageMagick, ImageMagick is a powerful open-source software suite for displaying, converting, and editing raster image files. It can read and write over 200 image file formats, making it a versatile tool for working with images. ImageMagick is commonly used for tasks such as converting between different image formats, resizing and cropping images, applying various effects and filters, and generating thumbnails. It provides a command-line interface for batch processing as well as libraries for integration into programming languages like Python, PHP, and Perl. ImageMagick is widely used in web development, graphic design, and scientific applications due to its flexibility and extensive capabilities.
ImageMagick offers a wide range of features for image processing and manipulation. Here are some key features:
Overall, ImageMagick is a versatile and powerful tool for image processing, editing, and manipulation, suitable for a wide range of applications including web development, graphic design, scientific analysis, and more.
Imagick is a PHP extension that provides a wrapper for the ImageMagick library, allowing PHP developers to access and manipulate images using ImageMagick’s functionality. It enables PHP scripts to perform a wide range of image processing tasks, such as resizing, cropping, rotating, applying filters and effects, and converting between different image formats.
With Imagick, PHP developers can harness the power of ImageMagick directly within their PHP applications, making it easier to work with images and perform complex image manipulations programmatically. This extension is commonly used in web development for tasks such as generating thumbnails, processing user-uploaded images, creating dynamic image content, and more.
Imagick provides an object-oriented interface in PHP, making it intuitive to use for developers familiar with object-oriented programming principles. Additionally, it offers extensive documentation and examples to help developers get started with integrating image processing capabilities into their PHP applications efficiently.
We are using a minimal Rocky Linux 9 virtual machine with following specifications.
Login as root user on your Linux server. You can use any ssh client for this purpose.
If you are not used to Linux commandline then we recommend that you should attend online training Linux Command Line: From novice to wizard
Now, execute following command at Linux terminal to update your Rocky Linux server.
# dnf update -y
If above command updates your Linux Kernel, then you should reboot your Linux server, before moving forward with this Linux tutorial.
# reboot
Note down the versions of Linux operating system and Linux Kernel.
# cat /etc/rocky-release Rocky Linux release 9.1 (Blue Onyx) # uname -r 5.14.0-162.23.1.el9_1.x86_64
Here, we are installing ImageMagick with PHP-Imagick to use by a web application for conversion of images.
Now, there is a question arises in the mind of many readers that:
Is it mandatory to setup a LAMP server for ImageMagick?
The answer is certainly NOT.
You can easily install ImageMagick separately on a Linux server. But it is being observed that, the ImageMagick is most commonly used by web applications. Therefore, we are installing a PHP based web server here.
Execute following dnf command to install Apache and PHP on Rocky Linux 9.
# dnf install -y httpd php-fpm
Enable and start Apache and PHP services.
# systemctl enable --now httpd php-fpm Created symlink /etc/systemd/system/multi-user.target.wants/httpd.service → /usr/lib/systemd/system/httpd.service. Created symlink /etc/systemd/system/multi-user.target.wants/php-fpm.service → /usr/lib/systemd/system/php-fpm.service.
Allow the HTTP service in Linux Firewall to make your websites accessible from network.
# firewall-cmd --permanent --add-service=http success # firewall-cmd --reload success
ImageMagick software is available in EPEL (Extra Packages for Enterprise Linux) yum repository. Therefore, install EPEL repository by using dnf command.
# dnf install -y epel-release
Additionally, you may enable the CRB (CodeReady Builder) yum repository.
Be informed that, Power Tools repository has been replaced by CRB repository in Rocky Linux 9.
Enable the CRB repository executing following Linux command.
# /usr/bin/crb enable Enabling CRB repo CRB repo is enabled and named: crb
Build yum cache for newly installed yum repositories.
# dnf makecache
All repositories has been setup. Now you can easily install ImageMagick on Linux by invoking dnf command.
# dnf install -y ImageMagick ImageMagick-devel
Check the version of Magick-config to verify ImageMagick installation.
# Magick-config --version 6.9.12-82 Q16
PHP Imagick is a PHP extension to create and modify images using the ImageMagick API.
You need to install PHP development and PHP Pear to install and manage PHP extensions.
# dnf install -y php-devel php-pear make
Now, you can install PHP Imagick by executing pecl command.
# pecl install imagick
Add Imagick extension to php.ini file.
# echo "extension=imagick.so" > /etc/php.d/20-imagick.ini
Restart Apache and PHP services to load Imagick module.
# systemctl restart httpd php-fpm
Execute following command to verify that Imagick module is loaded successfully.
# php -m | grep imagick imagick
You can also verify this by creating a phpinfo webpage.
# echo "<?php phpinfo ();?>" > /var/www/html/index.php
Open URL http://web-01.centlinux.com in a web browser.
Scroll down and you will find the Imagick section there.
When it comes to installing ImageMagick software on Rocky Linux 9, the possibilities for enhancing your image processing capabilities are endless. Whether you’re a developer, designer, or enthusiast, ImageMagick opens up a world of creative potential and practical utility. By following our comprehensive guide, you’ll seamlessly integrate this powerful tool into your workflow, unlocking new avenues for image manipulation, conversion, and analysis. Embrace the power of ImageMagick on Rocky Linux 9, and elevate your projects to new heights with ease and efficiency. We suggest that you should read The Definitive Guide to ImageMagick (PAID LINK) by Michael Still, before using ImageMagick for image conversions.
Puppy Linux is a fast, lightweight OS designed for speed and simplicity, perfect for old…
Learn how to change Apache document root in Linux by following this step-by-step guide. Adjust…
Discover how to change Apache port in Linux easily. Follow our simple guide to modify…
Learn how to create a virtual host in Apache Server with this comprehensive guide. Set…
Discover 10 practical tasks for the RHCSA exam with step-by-step solutions. Boost your Linux skills…
Discover the ultimate Fail2ban configuration guide. Learn how to set up, customize, and optimize Fail2ban…
This website uses cookies.