{"id":9513,"date":"2021-08-23T14:43:49","date_gmt":"2021-08-23T14:43:49","guid":{"rendered":"https:\/\/linuxways.net\/?p=9513"},"modified":"2021-08-23T14:43:49","modified_gmt":"2021-08-23T14:43:49","slug":"how-to-install-imagemagick-on-centos-8","status":"publish","type":"post","link":"https:\/\/linuxways.net\/de\/centos\/how-to-install-imagemagick-on-centos-8\/","title":{"rendered":"How to Install ImageMagick on CentOS 8"},"content":{"rendered":"<p>ImageMagick is an open-source, free, and powerful application used for creating, editing, and converting images into various formats. Some of the images formats it supports include PNG, GIF, JPEG, PDF, EXR, WebP, and TIFF. Using ImageMagick, you can resize, rotate, crop, distort, flip, modify image colors, and apply a number of effects. You can also add text and different shapes to images.<\/p>\n<p>In this post, we will cover how to install ImageMagick on CentOS using two different methods:<\/p>\n<p>\u2022 Installation via Repository<\/p>\n<p>\u2022 Installation via Source<\/p>\n<h2>Installation of ImageMagick via Repository<\/h2>\n<p>ImageMagick is available in the Yum default repositories. In this method, we will install ImageMagick via the Yum repository. Follow the below steps for the installation procedure:<\/p>\n<p>1. First, install some prerequisites packages in your system using the command below:<\/p>\n<pre>$ sudo yum install gcc php-devel php-pear<\/pre>\n<p>If prompted, provide the sudo password, and then it will start installing all the prerequisites. Once the prerequisites are installed, move on to the next step.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1162\" height=\"914\" class=\"wp-image-9514\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/08\/word-image-430.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/08\/word-image-430.png 1162w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/08\/word-image-430-300x236.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/08\/word-image-430-1024x805.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/08\/word-image-430-768x604.png 768w\" sizes=\"auto, (max-width: 1162px) 100vw, 1162px\" \/><\/p>\n<p>2. Now you can install ImageMagick on your system. Use the command below to do so:<\/p>\n<pre>$ sudo yum install ImageMagick ImageMagick-devel ImageMagick-perl<\/pre>\n<p>If prompted, provide the sudo password. After this, the installation of ImageMagick will be started on your system.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"949\" height=\"665\" class=\"wp-image-9515\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/08\/word-image-431.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/08\/word-image-431.png 949w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/08\/word-image-431-300x210.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/08\/word-image-431-768x538.png 768w\" sizes=\"auto, (max-width: 949px) 100vw, 949px\" \/><\/p>\n<p>Once ImageMagick is installed, you can verify it by running the command below:<\/p>\n<pre>$ convert --version<\/pre>\n<p>The result below shows that ImageMagick version <strong>6.9.10-86<\/strong> has been installed on our machine.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1019\" height=\"159\" class=\"wp-image-9516\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/08\/word-image-432.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/08\/word-image-432.png 1019w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/08\/word-image-432-300x47.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/08\/word-image-432-768x120.png 768w\" sizes=\"auto, (max-width: 1019px) 100vw, 1019px\" \/><\/p>\n<h2>Installation of ImageMagick via Source<\/h2>\n<p>In this method, we will install ImageMagick via source code. Follow the below steps for the installation procedure:<\/p>\n<p>1. First, install some development tools on your system using the command below:<\/p>\n<pre>$ sudo yum groupinstall 'Development Tools'<\/pre>\n<p>Then install some other packages using the command below:<\/p>\n<pre>$ sudo yum install freetype-devel libjpeg-devel jasper-devel libpng-devel bzip2-devel libtiff-devel giflib-devel zlib-devel ghostscript-devel djvulibre-devel libwmf-devel librsvg2-devel libtool-ltdl-devel libX11-devel lcms-devel libXext-devel libXt-devel libxml2-devel OpenEXR-devel php-devel<\/pre>\n<p>2. Now, download ImageMagick source code by running this command in the Terminal:<\/p>\n<pre>$ wget https:\/\/www.imagemagick.org\/download\/ImageMagick.tar.gz<\/pre>\n<p>The downloaded file will be saved in your current directory as ImageMagick.tar.gz.<\/p>\n<p>3. Extract the archive by running the command below in the Terminal:<\/p>\n<pre>$ tar xvzf ImageMagick.tar.gz<\/pre>\n<p>You can find the extracted archive in your current directory as ImageMagick-7.1.0-4.<\/p>\n<p>4. Move inside the extracted archive directory and run the configure script using the commands below:<\/p>\n<pre>$ cd ImageMagick-7.1.0-4\/<\/pre>\n<pre>$ sudo .\/configure<\/pre>\n<p>This command will check for all the dependencies that are required to build and install the package.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"712\" height=\"420\" class=\"wp-image-9517\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/08\/word-image-433.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/08\/word-image-433.png 712w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/08\/word-image-433-300x177.png 300w\" sizes=\"auto, (max-width: 712px) 100vw, 712px\" \/><\/p>\n<p>5. Now, you will need to build the package by running this command:<\/p>\n<pre>$ sudo make<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"731\" height=\"468\" class=\"wp-image-9518\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/08\/word-image-434.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/08\/word-image-434.png 731w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/08\/word-image-434-300x192.png 300w\" sizes=\"auto, (max-width: 731px) 100vw, 731px\" \/><\/p>\n<p>6. Then use this command to install the package:<\/p>\n<pre>$ sudo make install<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"927\" height=\"398\" class=\"wp-image-9519\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/08\/word-image-435.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/08\/word-image-435.png 927w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/08\/word-image-435-300x129.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/08\/word-image-435-768x330.png 768w\" sizes=\"auto, (max-width: 927px) 100vw, 927px\" \/><\/p>\n<p>Now it will take a while, after which ImageMagick will be installed on your machine.<\/p>\n<p>To verify the installation of ImageMagick, run this command:<\/p>\n<pre>$ magick --version<\/pre>\n<p>The result below shows that ImageMagick version 7.1.0-4 has been installed on our machine.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"735\" height=\"133\" class=\"wp-image-9520\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/08\/word-image-436.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/08\/word-image-436.png 735w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/08\/word-image-436-300x54.png 300w\" sizes=\"auto, (max-width: 735px) 100vw, 735px\" \/><\/p>\n<h2>Uninstall ImageMagick<\/h2>\n<p>If in case you need to uninstall ImageMagick from your system, you can do so using the methods below:<\/p>\n<p>If ImageMagick has been installed via repository, it can be uninstalled using the command below:<\/p>\n<pre>$ sudo yum remove imagemagick<\/pre>\n<p>It will remove ImageMagick and its dependencies from your system.<\/p>\n<p>If ImageMagick has been installed via source code, it can be uninstalled using the commands below:<\/p>\n<p>Move inside the ImageMagick directory using the command below:<\/p>\n<pre>$ cd ImageMagick-7.1.0-4\/<\/pre>\n<p>Then uninstall it as follows:<\/p>\n<pre>$ sudo make uninstall<\/pre>\n<p>In this post, we covered how to install ImageMagick on the CentOS machine via two different methods. We also covered how to uninstall ImageMagick in case you want to remove it from your machine.<\/p>","protected":false},"excerpt":{"rendered":"<p>ImageMagick is an open-source, free, and powerful application used for creating, editing, and converting images into various formats. Some of the images formats it supports include PNG, GIF,&hellip;<\/p>","protected":false},"author":1,"featured_media":9607,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[93,288],"class_list":["post-9513","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-centos","tag-centos-8","tag-imagemagick"],"_links":{"self":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/9513","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/comments?post=9513"}],"version-history":[{"count":0,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/9513\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media\/9607"}],"wp:attachment":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media?parent=9513"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/categories?post=9513"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/tags?post=9513"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}