Linux under PHP installation Imagick

Source: Internet
Author: User
Description PHP installation directory:/USR/LOCAL/PHP5 PHP.ini configuration file path:/usr/local/php5/etc/php.ini Nginx installation directory:/usr/local/nginx Nginx website root directory:/usr/local/nginx/html 1. Install the Compilation tool Yum install wget make gcc gcc-c++ gtk+-devel zlib-devel OpenSSL openssl-devel pcre-devel kernel keyutils Patch Perl 2, installation ImageMagick
System operation and MaintenanceWww.osyunwei.com Warm reminder: qihang01 original content copyright, reproduced please indicate the source and the original link Cd/usr/local/src #进入软件包存放目录 WgetHttp://www.imagemagick.org/download/ImageMagick.tar.gz #下载ImageMagick Tar zxvf ImageMagick.tar.gz #解压 CD imagemagick-6.7.9-3 #进入安装目录 ./configure--prefix=/usr/local/imagemagick #配置 Make #编译 Make install #安装 Export pkg_config_path=/usr/local/imagemagick/lib/pkgconfig/ #设置环境变量 3, Installation Imagick Cd/usr/local/src WgetHttp://pecl.php.net/get/imagick-3.0.1.tgz #下载imagick Tar zxvf imagick-3.0.1.tgz CD imagick-3.0.1 /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 #安装 Note: An error occurred during installation, generally due to the lack of a compilation toolkit, you can follow the prompts to refer to the first step to install the appropriate kit can be After the installation is complete, the following interface appears, remembering the following path, which will be used later Installing Shared extensions:/usr/local/php5/lib/php/extensions/no-debug-non-zts-20090626/ #imagick模块路径 4. Configure PHP Support Imagick Vi/usr/local/php5/etc/php.ini #编辑配置文件, add the following on the last line extension= "Imagick.so" 5. Testing vi/usr/local/nginx/html/phpinfo.php #编辑, enter the following code Phpinfo (); ?> wq! #保存退出 vi/usr/local/nginx/html/imagick.php #编辑, enter the following code 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, 225); echo $image; ?>

Above the introduction of Linux under the installation of PHP Imagick, including aspects of the content, I hope that the PHP tutorial interested in a friend helpful.

  • /spanmicrosoft>

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.