能二 發表於 2024-3-28 00:00:00

centos系统上为php安装imagick扩展以及magickwand扩展的方法

<p style='margin: 0px; padding: 5px 0px; outline: none; font-size: 14px; line-height: 30px; font-family: tahoma, arial, "Microsoft YaHei";'>
        1. 程序准备<br>
        ImageMagick 【http://www.imagemagick.org/script/download.php】<br>
        imagick 【http://pecl.php.net/package/imagick】<br>
        MagickWand For PHP 【http://www.magickwand.org/】</p>
<p style='margin: 0px; padding: 5px 0px; outline: none; font-size: 14px; line-height: 30px; font-family: tahoma, arial, "Microsoft YaHei";'>
        2. 安装程序</p>
<p style='margin: 0px; padding: 5px 0px; outline: none; font-size: 14px; line-height: 30px; font-family: tahoma, arial, "Microsoft YaHei";'>
        1) 安装 ImageMagick 【如果已经安装请跳过】,此处以当前的最新版本 ImageMagick-6.7.5-5.tar.gz 为例</p>
<p style='margin: 0px; padding: 5px 0px; outline: none; font-size: 14px; line-height: 30px; font-family: tahoma, arial, "Microsoft YaHei";'>
         </p>
<div class="msgheader" style='margin: 3px auto 0px; padding: 0px 3px; outline: none; line-height: 21.6px; clear: both; border-width: 1px; border-style: solid; border-color: rgb(0, 153, 204); background: rgb(246, 251, 255); overflow: hidden; font-family: tahoma, arial, "Microsoft YaHei";'>
        <div class="right">
                <span><u>复制代码</u></span>
</div>
        <p>
                代码如下:</p>
</div>
<div class="msgborder" id="phpcode6" style='margin: 0px auto 3px; padding: 0px 3px; outline: none; line-height: 25.2px; font-size: 14px; clear: both; border-right: 1px solid rgb(0, 153, 204); background: rgb(221, 237, 251); overflow: hidden; border-left: 1px solid rgb(0, 153, 204); word-break: break-all; border-bottom: 1px solid rgb(0, 153, 204); word-wrap: break-word; font-family: tahoma, arial, "Microsoft YaHei";'>
        <br>
        tar zxvf ImageMagick-6.7.5-5.tar.gz<br>
        cd ImageMagick-6.7.5-5<br>
        ./configure<br>
        make<br>
        make install<br>
        ldconfig /usr/local/lib&lt;/p&gt; &lt;p&gt;</div>
<p style='margin: 0px; padding: 5px 0px; outline: none; font-size: 14px; line-height: 30px; font-family: tahoma, arial, "Microsoft YaHei";'>
         </p>
<p style='margin: 0px; padding: 5px 0px; outline: none; font-size: 14px; line-height: 30px; font-family: tahoma, arial, "Microsoft YaHei";'>
        至此安装结束,安装路径默认为 /usr/local下面</p>
<p style='margin: 0px; padding: 5px 0px; outline: none; font-size: 14px; line-height: 30px; font-family: tahoma, arial, "Microsoft YaHei";'>
        2)配置pkgconfig相关参数【如果处理则跳过】</p>
<p style='margin: 0px; padding: 5px 0px; outline: none; font-size: 14px; line-height: 30px; font-family: tahoma, arial, "Microsoft YaHei";'>
         </p>
<div class="msgheader" style='margin: 3px auto 0px; padding: 0px 3px; outline: none; line-height: 21.6px; clear: both; border-width: 1px; border-style: solid; border-color: rgb(0, 153, 204); background: rgb(246, 251, 255); overflow: hidden; font-family: tahoma, arial, "Microsoft YaHei";'>
        <div class="right">
                <span><u>复制代码</u></span>
</div>
        <p>
                代码如下:</p>
</div>
<div class="msgborder" id="phpcode7" style='margin: 0px auto 3px; padding: 0px 3px; outline: none; line-height: 25.2px; font-size: 14px; clear: both; border-right: 1px solid rgb(0, 153, 204); background: rgb(221, 237, 251); overflow: hidden; border-left: 1px solid rgb(0, 153, 204); word-break: break-all; border-bottom: 1px solid rgb(0, 153, 204); word-wrap: break-word; font-family: tahoma, arial, "Microsoft YaHei";'>
        <br>
        ln -s /usr/local/lib/pkgconfig/MagickWand.pc /usr/lib/pkgconfig/MagickWand.pc<br>
        ln -s /usr/local/lib/pkgconfig/ImageMagick.pc /usr/lib/pkgconfig/ImageMagick.pc</div>
<p style='margin: 0px; padding: 5px 0px; outline: none; font-size: 14px; line-height: 30px; font-family: tahoma, arial, "Microsoft YaHei";'>
         </p>
<p style='margin: 0px; padding: 5px 0px; outline: none; font-size: 14px; line-height: 30px; font-family: tahoma, arial, "Microsoft YaHei";'>
        3)安装 imagick 【此处以最新版本3.1.0 RC1为例】</p>
<p style='margin: 0px; padding: 5px 0px; outline: none; font-size: 14px; line-height: 30px; font-family: tahoma, arial, "Microsoft YaHei";'>
         </p>
<div class="msgheader" style='margin: 3px auto 0px; padding: 0px 3px; outline: none; line-height: 21.6px; clear: both; border-width: 1px; border-style: solid; border-color: rgb(0, 153, 204); background: rgb(246, 251, 255); overflow: hidden; font-family: tahoma, arial, "Microsoft YaHei";'>
        <div class="right">
                <span><u>复制代码</u></span>
</div>
        <p>
                代码如下:</p>
</div>
<div class="msgborder" id="phpcode8" style='margin: 0px auto 3px; padding: 0px 3px; outline: none; line-height: 25.2px; font-size: 14px; clear: both; border-right: 1px solid rgb(0, 153, 204); background: rgb(221, 237, 251); overflow: hidden; border-left: 1px solid rgb(0, 153, 204); word-break: break-all; border-bottom: 1px solid rgb(0, 153, 204); word-wrap: break-word; font-family: tahoma, arial, "Microsoft YaHei";'>
        <br>
        tarzxvfimagick-3.1.0RC1.tgz<br>
        cdimagick-3.1.0RC1<br>
        /usr/local/webserver/php/bin/phpize<br>
        ./configure--enable-shared--enable-static--with-php-config=/usr/local/webserver/php/bin/php-config--with-imagick=/usr/local/<br>
        make<br>
        makeinstall</div>
<p style='margin: 0px; padding: 5px 0px; outline: none; font-size: 14px; line-height: 30px; font-family: tahoma, arial, "Microsoft YaHei";'>
         </p>
<p style='margin: 0px; padding: 5px 0px; outline: none; font-size: 14px; line-height: 30px; font-family: tahoma, arial, "Microsoft YaHei";'>
        4)安装MagickWandForPHP【此处以最新版本1.0.9为例】</p>
<p style='margin: 0px; padding: 5px 0px; outline: none; font-size: 14px; line-height: 30px; font-family: tahoma, arial, "Microsoft YaHei";'>
         </p>
<div class="msgheader" style='margin: 3px auto 0px; padding: 0px 3px; outline: none; line-height: 21.6px; clear: both; border-width: 1px; border-style: solid; border-color: rgb(0, 153, 204); background: rgb(246, 251, 255); overflow: hidden; font-family: tahoma, arial, "Microsoft YaHei";'>
        <div class="right">
                <span><u>复制代码</u></span>
</div>
        <p>
                代码如下:</p>
</div>
<div class="msgborder" id="phpcode9" style='margin: 0px auto 3px; padding: 0px 3px; outline: none; line-height: 25.2px; font-size: 14px; clear: both; border-right: 1px solid rgb(0, 153, 204); background: rgb(221, 237, 251); overflow: hidden; border-left: 1px solid rgb(0, 153, 204); word-break: break-all; border-bottom: 1px solid rgb(0, 153, 204); word-wrap: break-word; font-family: tahoma, arial, "Microsoft YaHei";'>
        <br>
        tarzxvfMagickWandForPHP-1.0.9.tar.gz<br>
        cdMagickWandForPHP-1.0.9<br>
        /usr/local/webserver/php/bin/phpize<br>
        ./configure--enable-shared--enable-static--with-php-config=/usr/local/webserver/php/bin/php-config--with-magickwand=/usr/local/<br>
        make<br>
        makeinstall</div>
<p style='margin: 0px; padding: 5px 0px; outline: none; font-size: 14px; line-height: 30px; font-family: tahoma, arial, "Microsoft YaHei";'>
         </p>
<p style='margin: 0px; padding: 5px 0px; outline: none; font-size: 14px; line-height: 30px; font-family: tahoma, arial, "Microsoft YaHei";'>
        3.编译完成后,将生成的文件添加到php.ini即可!</p>
頁: [1]
查看完整版本: centos系统上为php安装imagick扩展以及magickwand扩展的方法