ubuntu Imagick 安装

To install the latest Imagick from PECL on an Ubuntu variant system, assuming your already have PHP5 and Apache2 installed, do the following.
You need your root password, have sudo privileges and be able to run commands from a shell (e.g via Konsole)

1. $ sudo aptitude install php-pear imagemagick php5-dev libmagick9-dev
2. do *not* install php5-imagick as you will install a later version from PECL
3. libmagick9-dev may install a whole load of dependencies. This package provides the Wand-config program and avoids the error on pecl install "configure: error: not found. Please provide a path to MagickWand-config or Wand-config program."
4. $ sudo pecl install Imagick
5. Hit enter to autodetect the "Imagemagick installation" prefix

You should see some compilation messages, noting any errors that stop the Imagick build.

When completed successfully, the following console message should appear

Build process completed successfully
Installing '/usr/lib/php5/20060613+lfs/imagick.so'
install ok: channel://pecl.php.net/imagick-2.2.0b2

Now for loading it when the web server starts/restarts
6. $ sudo vi /etc/php5/apache2/conf.d/php.ini
7. enter extension=imagick.so and save
8. $ sudo apache2ctl configtest
9. $ sudo apache2ctl restart

Notes:
* You can use any apt client e.g apt-get to install packages
* If you want beta Imagick then:
$ sudo pear config-set preferred_state beta
* You can now upgrade Imagick as new versions are made available in PECL the same way PEAR updates are handled.

see more in http://www.wemaster.com.cn/blog/?p=32
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值