28
Dec

安装ImageMagick小记


版权声明:可以在网上任意转载,转载时请务必以超链接形式标明文章原始出处、作者信息及本声明文字。
作者:shunz,出处:http://shunz.net/2004/12/49.html

因为安装drupal的image module必须用到ImageMagick,所以了解了一下,发现ImageMagick的功能非常强大。
张微波的BLOG里讲到了[url=http://www.5ilinux.com/blog/archives/000104.html]如何使ImageMagick支持PHP[/url],但是我现在发现在[url=http://www.imagemagick.org/www/download.html]ImageMagick网站的下载页面[/url]里已经有了一个叫MagickWand for PHP的插件,可以直接支持php。

下面我再说一下安装步骤:
1、首先安装ImageMagick程序
wget http://www.imagemagick.org/download/ImageMagick-6.1.7-5.tar.gz
tar zxvf ImageMagick-6.1.7-5.tar.gz
cd ImageMagick-6.1.7-5

./configure –enable-shared –enable-lzw –with-modules
make
make install
–enable-lzw 是打开lzw压缩

2、安装MagickWand for PHP
在安装之前如果还没有安装过php,请先按正常步骤安装一遍php,产生所需的phpize程序。
然后:
wget http://www.magickwand.org/download/php/MagickWandForPHP-0.1.0.tar.bz2
bunzip2 MagickWandForPHP-0.1.0.tar.bz2
tar xvf MagickWandForPHP-0.1.0.tar
mv MagickWandForPHP-0.1.0 PHP_SRC_DIR/ext/magickwand
注:PHP_SRC_DIR是指你的php源码目录

cd PHP_SRC_DIR/ext/magickwand/
运行phpize

然后 cd PHP_SRC_DIR
rm -rf ./configure
./buildconf –force

然后重新编译php
./configure –with-apache2=../httpd-2.0.52 –with-mysql=/usr/local/mysql –enable-bcmath –with-zlib –with-gd –with-jpeg-dir –enable-gd-native-ttf –with-ttf –with-freetype-dir –enable-memory-limit –enable-zend-multibyte –disable-ipv6 –disable-path-info-check –with-iconv –with-pear –disable-debug –with-apxs2=/usr/local/apache2/bin/apxs –with-magickwand=/usr/local/ImageMagick
gmake
gmake install

这样就ok了!

没有评论

第一个在本文留言。

发表评论

名字(必须)
邮箱(不会被公布)(必须)
网址

字体为 粗体 是必填项目,邮箱地址 永远不会 公布。

允许部分 HTML 代码:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>
URIs must be fully qualified (eg: http://shunz.net/) and all tags must be properly closed.

超出部分系统将会自动分段及换行。

请保证评论内容是与日志或 Blog 内容相关的,灌水、攻击性或不恰当的评论 may 会被编辑或删除。

    关于

      我,shunz,在这里默默记录自己的所学所思以及所关注的事情...
      Blog del.icio.us Flickr Furl Gmail/Google Talk Google Reader Google Shared Stuff Picasa Web Albums Twitter YouTube Zooomr douban

    订阅

    页面

    广告

    分类