{"id":1775,"date":"2020-07-11T17:27:12","date_gmt":"2020-07-12T00:27:12","guid":{"rendered":"https:\/\/SUMMALAI.COM\/?p=1775"},"modified":"2020-07-11T17:27:13","modified_gmt":"2020-07-12T00:27:13","slug":"how-to-install-imagemagick-and-php-imagick-on-centos-8-rhel-8","status":"publish","type":"post","link":"https:\/\/SUMMALAI.COM\/?p=1775","title":{"rendered":"How To Install ImageMagick and PHP Imagick on CentOS 8 \/ RHEL 8"},"content":{"rendered":"\n<p><a href=\"https:\/\/imagemagick.org\/\" target=\"_blank\" rel=\"noreferrer noopener\">ImageMagick<\/a>&nbsp;is an open-source software suite for creating, editing, converting, and modifying bitmap images. With ImageMagick, you can read and write over 200 image formats, including DPX, EXR, GIF, JPEG, JPEG-2000, PDF, PhotoCD, PNG, Postscript, SVG, and TIFF.<\/p>\n\n\n\n<p>Apart from providing a graphical interface for working with images, it also provides commands to resize an image, blur, crop, draw on, flip, join, re-sample, and&nbsp;<a href=\"https:\/\/imagemagick.org\/script\/command-line-tools.php\" target=\"_blank\" rel=\"noreferrer noopener\">much more<\/a>.<\/p>\n\n\n\n<p>PHP Imagick is a PHP extension by which you can call ImageMagick API to modify images.<\/p>\n\n\n\n<p>Here, we will see how to install\u00a0ImageMagick\u00a0and PHP Imagick on\u00a0CentOS 8\u00a0\/\u00a0RHEL 8.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"enable-epel-repository\">Enable EPEL Repository<\/h2>\n\n\n\n<p>ImageMagick packages are available in the EPEL repository for CentOS 8 \/ RHEL 8. So, follow the link to enable the EPEL repository.<\/p>\n\n\n\n<p>Run the below commands to enable the EPEL repository.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">### CentOS 8 ###\n\ndnf install -y epel-release\n\ndnf config-manager --set-enabled PowerTools\n\n### RHEL 8 ###\n\ndnf install -y https:\/\/dl.fedoraproject.org\/pub\/epel\/epel-release-latest-8.noarch.rpm\n\nARCH=$( \/bin\/arch )\nsubscription-manager repos --enable \"codeready-builder-for-rhel-8-${ARCH}-rpms\"\n<\/pre>\n\n\n\n<p><ins><\/ins><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"install-imagemagick\">Install ImageMagick<\/h2>\n\n\n\n<p>Once you have enabled the EPEL repository, install ImageMagick with\u00a0dnf\u00a0command.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>dnf install -y ImageMagick ImageMagick-devel<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"install-php-imagick\">Install PHP Imagick<\/h2>\n\n\n\n<p>PHP Imagick is a native PHP extension to create and modify bitmap images using the ImageMagick API.<\/p>\n\n\n\n<p>Install PHP, PHP development, and PHP Pear, which helps to install and manage PHP extensions.COPY<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>dnf install -y php php-devel php-pear make<\/code><\/pre>\n\n\n\n<p>Now, install PHP Imagick with&nbsp;pecl&nbsp;command.COPY<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>pecl install imagick<\/code><\/pre>\n\n\n\n<p>Add the extension into the&nbsp;php.ini&nbsp;file.COPY<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>echo \"extension=imagick.so\" > \/etc\/php.d\/20-imagick.ini<\/code><\/pre>\n\n\n\n<p>Restart the Apache web service to take an effect of newly installed PHP extension.COPY<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl restart httpd<\/code><\/pre>\n\n\n\n<p>Additionally, you can check the PHP modules details from PHPInfo.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/www.itzgeek.com\/wp-content\/uploads\/2020\/03\/PHP-Imagick-Extension.png\"><img decoding=\"async\" src=\"https:\/\/www.itzgeek.com\/wp-content\/uploads\/2020\/03\/PHP-Imagick-Extension.png\" alt=\"PHP Imagick Extension\"\/><\/a><figcaption>PHP Imagick Extension<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"conclusion\">Conclusion<\/h2>\n\n\n\n<p>That\u2019s All. I hope you have learned how to install\u00a0ImageMagick\u00a0and PHP Imagick on\u00a0CentOS 8\u00a0\/\u00a0RHEL 8.<\/p>\n\n\n\n<p>Reference: <a href=\"https:\/\/www.itzgeek.com\/post\/how-to-install-imagemagick-and-php-imagick-on-centos-8-rhel-8\/\">https:\/\/www.itzgeek.com\/post\/how-to-install-imagemagick-and-php-imagick-on-centos-8-rhel-8\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>ImageMagick&nbsp;is an open-source software suite for creating, editing, converting, and modifying bitmap images. With ImageMagick, you can read and write over 200 image formats, including DPX, EXR, GIF, JPEG, JPEG-2000, PDF, PhotoCD, PNG, Postscript, SVG, and TIFF. Apart from providing a graphical interface for working with images, it also provides commands to resize an image, <a class=\"read-more\" href=\"https:\/\/SUMMALAI.COM\/?p=1775\">Read More<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[262,5,263,178],"tags":[261,260],"class_list":["post-1775","post","type-post","status-publish","format-standard","hentry","category-centos","category-linux","category-php","category-wordpress","tag-imagemagick","tag-php"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=\/wp\/v2\/posts\/1775","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1775"}],"version-history":[{"count":0,"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=\/wp\/v2\/posts\/1775\/revisions"}],"wp:attachment":[{"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1775"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1775"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1775"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}