找了几篇外文的,写的很好,按照参考安装成功!

http://www.tecmint.com/install-imagemagick-in-linux/

ImageMagick is an free open source simple software suite for any kind of image manipulation that is used for creating, editing, converting, displaying image files. It can able to read and write over 200 image files such as JPEGGIFPNGTIFF and Photo CD image formats and it is also used for thumbnail or captcha generation. It also includes command line options for creating transparent or animated gif image formats and many more feature like resize, sharpen, rotate or add special effects to an image.

To use ImageMagick tool with PHP or Perl programming language, you will need to installImageMagick with Imagick PHP extension for PHP and ImageMagick-perl extension for Perl.

Imagick is an simple php extension for creating and modifying images using the ImageMagick API program. There is a confusion in name, as people think that ImageMagick and Imagickboth are same, but you can use ImageMagick without Imagick extension but you need both installed on your machine to use and run it.

Installing ImageMagick

First, install following prerequisite php-pear and gcc packages to compile imagick PHP extension.

# yum install php-pear gcc

Once you’ve installed php-pear and gcc packages, you may now install ImageMagick software for PHP and Perl support using Yum command.

# yum install ImageMagick ImageMagick-devel ImageMagick-perl

Next, compile the imagick for PHP extension. To do, simple run the following ‘pecl‘ command. It will install ImageMagick and imagick PHP extension module ‘imagick.so‘ under/usr/lib/php/modules directory. If you are using 64-bit system, the module directory path would be /usr/lib64/php/modules.

# pecl install imagick 

WARNING: channel "pecl.php.net" has updated its protocols, use "pecl channel-update pecl.php.net" to update
downloading imagick-3.1.0RC2.tgz ...
Starting to download imagick-3.1.0RC2.tgz (93,264 bytes)
.....................done: 93,264 bytes
15 source files, building
running: phpize
Configuring for:
PHP Api Version: 20090626
Zend Module Api No: 20090626
Zend Extension Api No: 220090626
Please provide the prefix of Imagemagick installation [autodetect] :

Note: It will ask you to provide Imagemagick installation prefix, simply hit enter to auto detect.

Now, add the ‘imagick.so‘ extension to ‘/etc/php.ini‘ file.

echo extension=imagick.so >> /etc/php.ini

Next, restart Apache web server. 这个地方现在一般都是Nginx了,所以应该换成:service nginx restart

# service httpd restart

Verify imagick PHP extension by running the following command. You will see imagick extension similar to below.

# php -m | grep imagick

imagick

Alternatively, you can create a file called ‘phpinfo.php‘ under website root directory (ex:/var/www/html/).

# vi /var/www/html/phpinfo.php

Add the following code.

<?php
phpinfo ();
?>

Open your favorite web browser and type ‘http://localhost/phpinfo.php‘ or ‘http://ip-addresss/phpinfo.php‘ and verify the imagick extension.

Imagick PHP Extension

Reference Link

http://www.24x7servermanagement.com/blog/?p=754

在CentOS上为DiscuzX3安装ImageMagick支持。的更多相关文章

  1. CentOS上使用yum安装Apache

    关键词 CentOS上使用yum安装Apache 摘要 Apache在Linux系统中,其实叫“httpd”,它“无耻的”占据了官方名义!CentOS可以使用yum命令,非常简单和容易的安装Apach ...

  2. centos下php扩展安装imagemagick

    centos下php扩展安装imagemagick 2015-10-23TONY7PHP 对于php的imagick主要是两部分的安装 ImageMagick主程序地址http://www.image ...

  3. CentOS随笔 - 2.CentOS7安装ftp支持(vsftpd)

    前言 转帖请注明出处: http://www.cnblogs.com/Troy-Lv5/ 在前一篇文章中介绍了在虚拟机中安装CentOS7, 接下来就要进行配置了, 第一个就是安装ftp支持. 要不然 ...

  4. 在Linux CentOS上编译并安装Clang 3.5.0

    编译CoreCLR需要Clang 3.5,而CentOS上安装的是Clang 3.4.2(yum repos中最新版也是这个),只能自己手工编译LLVM的源代码进行安装. (注:CentOS的版本是6 ...

  5. CentOS上升级gcc编译器使支持C++11

    首先向博主致敬,好的东西拿来共享了,用一下不错. https://blog.csdn.net/clirus/article/details/62424517 0. 目标  最近在学习c++11,我本机 ...

  6. CentOS上yum方式安装配置LNMP

    实验环境 一台最小化安装的CentOS 7.3虚拟机 安装软件包 yum install -y epel-* yum install -y nginx mariadb-server php php-m ...

  7. CentOS系统php5.6安装ImageMagick处理webp格式图片

    1.先安装webp yum install libwebp 2.编译安装ImageMagick 之前有过yum安装的先卸载 yum remove ImageMagick 我使用的是老版本ImageMa ...

  8. centos上tensorflow一键安装脚本

    鉴于tensorflow在centos上安装相当麻烦,特地制作了一个脚本方便以后移植到其它机器上,脚本含有其它python常用包: #! /bin/bash   sudo yum install -y ...

  9. centos上shellcheck的安装

    关于shellcheck的作用和功能,自行查阅. centos7 上安装shellcheck的过程中查了很多资料,大部分都是在ubunt下安装的,centos的比较少,然后好不容易看到一个https: ...

随机推荐

  1. Linux Master/Baremetal Remote 配置下的裸机调试

    为了实现在ZC702开发板上的两颗Cortex-A9处理器上实现Linux Master/Baremetal Remote 配置,并对Remote端的裸机程序进行调试,需要注意的几点如下: 一.建立p ...

  2. uglifyjs 压缩js

    第一步 安装nodejs dos下执行 node -v npm -v

  3. html5有什么布局标签

    header h1 nav ul li a section(id) div h3 article figure img article h4 header time datetime='' body ...

  4. php文件上传大小限制设置

    配置选项说明: upload_max_filesize 所上传的文件的最大大小. post_max_size 设定 POST 数据所允许的最大大小. memory_limit 设定了一个脚本所能够申请 ...

  5. Android Context创建过程

        特定的资源或者类构成了Android应用程序的运行上下文环境 PackageManager, ClassLoader, Assert等等 Android应用程序窗口的运行上下文环境是通过Con ...

  6. uploadify实现七牛云存储 显示上传进度+页面显示

    准备: uploadify下载地址: http://www.uploadify.com/download/ 七牛 php-sdk开发指南: http://developer.qiniu.com/doc ...

  7. KeepAlive详解

    KeepAlive既熟悉又陌生,踩过坑的同学都知道痛.一线运维工程师踩坑之后对于KeepAlive的总结,你不应该错过! 最近工作中遇到一个问题,想把它记录下来,场景是这样的: 从上图可以看出,用户通 ...

  8. POJ 3026 Borg Maze bfs+Kruskal

    题目链接:http://poj.org/problem?id=3026 感觉英语比题目本身难,其实就是个最小生成树,不过要先bfs算出任意两点的权值. #include <stdio.h> ...

  9. pyramid的第一个项目

    1,安装pyramid --在次之前最好先安装python virtualenv --python virtualenv ---激活方式pyenv activate pip install pyram ...

  10. 关于Java(不同工具或平台与“Hello World”)

    对于任何编程语言,都最常见的入门应用: Hello World NetBeans 和 “Hello World” 编写 Java 程序前,先要准备好: Java SE Development Kit ...