首頁  >  文章  >  後端開發  >  Linux下php安裝imagick

Linux下php安裝imagick

WBOY
WBOY原創
2016-08-08 09:32:001098瀏覽
說明:php安裝目錄:/usr/local/php5php.ini設定檔路徑:/usr/local/php5/etc/php.iniNginx安裝目錄:/usr/local/ nginxNginx網站根目錄:/usr/local/nginx/html1、安裝編譯工具yum install wget  make gcc gvel-ccopenpk keyutils  patch perl2、安裝ImageMagick
系統運作維 www.osyunwei.com 溫馨提醒:qihang01原創內容版權所有,轉載請註明出處及原文連結cd /usr/local/src  wget http://www.imagemagick.org/download/ImageMagick.tar.gz  #下載ImageMagicktar zxvf ImageMagick.tar.gz #進入安裝目錄./configure --prefix=/usr/local/imagemagick  #配置make #編譯make install  #安裝export PKG_CONFIG_PATH=/ usr/local/imagemagick/lib/pkgconfig/  #設定環境變數3、安裝imagickcd /usr/local/srcwget http://pecl.php.net/get/imagick-3.0.1.tgz  #下載imagicktarxvf imagick-3.0.1.3.3.0. /usr/local/php5/bin/phpize #用phpize產生configure設定檔./configure  --with-php-config=/usr/local/php5/bin/php-config -- with-imagick=/usr/local/imagemagick #配置make #編譯make install 包中導致,可依提示參考第一步安裝對應的工具包即可Installing shared extensions:     /usr/local/php5 /lib/php/extensions/no-debug-non-zts-20090626/ #imagick模組路徑4、設定php支援imagickvi /usr/local/php.#編輯檔案,在最後一行加入以下內容extension="imagick.so"5、測試vi /usr/local/nginx/html/phpinfo.php 以下程式碼phpinfo();?>wq! 編輯,輸入以下程式碼header('Content-type: image/jpeg');$image = new Imagick('www.osyunwei.com.jpg'); / If 0 is provided as a width or height parameter,// aspect ratio is maintained$image->thumbnailImage(300, $image->thumbnailImage(300, $image->thumbnailImage(300, echo $image;?>

以上就介紹了Linux下php安裝imagick,包括了方面的內容,希望對PHP教程有興趣的朋友有幫助。

陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn