{"id":2357,"date":"2014-10-15T21:06:16","date_gmt":"2014-10-15T21:06:16","guid":{"rendered":"http:\/\/www.sitekickr.com\/blog\/?p=2357"},"modified":"2016-05-05T17:27:21","modified_gmt":"2016-05-05T17:27:21","slug":"installing-imagemagick-centos-php","status":"publish","type":"post","link":"https:\/\/www.sitekickr.com\/blog\/installing-imagemagick-centos-php\/","title":{"rendered":"Installing ImageMagick on CentOS for use with PHP"},"content":{"rendered":"<p>So, kind of a specific title, but I imagine there are many out there in my shoes.<\/p>\n<p>I set about this task over an hour ago, and just finally came to a solution. So, here&#8217;s the scoop.<\/p>\n<p>You&#8217;ll see a lot of posts saying, &#8220;just pecl install imagick&#8221; and you&#8217;re off!<\/p>\n<p>Well, it seems that you need to have the actual ImageMagick binary first. Then, once the binary is installed, you&#8217;re free to pecl install.<\/p>\n<p>So, long story short, here&#8217;s what you need to do to get ImageMagick PHP-ready.<\/p>\n<pre class=\"prettyprint\"><code>yum --enablerepo remi install ImageMagick ImageMagick-devel\r\npecl install imagick\r\n<\/code><\/pre>\n<p>Then, add the following to your php.ini<\/p>\n<pre class=\"prettyprint\"><code> extension=imagick.so<\/code><\/pre>\n<p>Then restart your Apache and you&#8217;re golden!<\/p>\n<p>You may not have the remi repository setup on your system. I swear by it. It seems to provide more up-to-date versions than the default repos. \u00a0If you don&#8217;t want to use that repo, just remove it from the command.<\/p>\n<p>If you do want to, you can enable the repo with<\/p>\n<pre>rpm -Uvh http:\/\/download.fedoraproject.org\/pub\/epel\/6\/x86_64\/epel-release-6-8.noarch.rpm<\/pre>\n<p>As seen in my other post:\u00a0<a href=\"http:\/\/www.sitekickr.com\/blog\/provisioning-server\/\">Setting up a new linux server<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>It&#8217;s not brain science, but it did take me a reasonable amount of time to figure out how to properly configure my CentOS server for using ImageMagick with PHP.<\/p>\n","protected":false},"author":1,"featured_media":2358,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"amp_status":""},"categories":[41],"tags":[141,253],"_links":{"self":[{"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/posts\/2357"}],"collection":[{"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/comments?post=2357"}],"version-history":[{"count":3,"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/posts\/2357\/revisions"}],"predecessor-version":[{"id":2495,"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/posts\/2357\/revisions\/2495"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/media\/2358"}],"wp:attachment":[{"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/media?parent=2357"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/categories?post=2357"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/tags?post=2357"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}