關于編譯安裝php的選項可以為
1
<code> </code><code>.</code><code>/configure</code> <code>--prefix=</code><code>/usr/local/php</code> <code>--with-mysql=mysqlnd --with-pdo-mysql=mysqlnd --with-mysqli=mysqlnd --with-iconv --with-openssl --</code><code>enable</code><code>-mbstring --with-freetype-</code><code>dir</code> <code>--with-jpeg-</code><code>dir</code> <code>--with-png-</code><code>dir</code> <code>--with-libxml-</code><code>dir</code><code>=</code><code>/usr/</code> <code>--</code><code>enable</code><code>-xml --</code><code>enable</code><code>-sockets --</code><code>enable</code><code>-fpm --with-config-</code><code>file</code><code>-path=</code><code>/etc/</code> <code>--with-config-</code><code>file</code><code>-scan-</code><code>dir</code><code>=</code><code>/etc/php</code><code>.d --with-bz2 --with-curl --with-mhash --with-mcrypt --</code><code>enable</code><code>-intl --with-gd --</code><code>enable</code><code>-gd-native-ttf --</code><code>enable</code><code>-shmop</code>
需要安裝memcache需要編譯libmemcache
編譯安裝
2
3
4
5
<code>wget </code>
<code>tar</code> <code>xf libmemcached-1.0.18.</code><code>tar</code><code>.gz </code>
<code>cd</code> <code>libmemcached-1.0.18.</code><code>tar</code><code>.gz</code>
<code>.</code><code>/configure</code>
<code>make</code> <code>&& </code><code>make</code> <code>install</code>
擴充memcache子產品
<code><a href=</code><code>"http://pecl.php.net/get/memcache-3.0.8.tgz"</code> <code>target=</code><code>"_blank"</code> <code>style=</code><code>"color: rgb(66, 133, 244);"</code><code>>http:</code><code>//pecl</code><code>.php.net</code><code>/get/memcache-3</code><code>.0.8.tgz<</code><code>/a</code><code>></code>
<code>tar</code> <code>xf memcache-3.0.8.tgz</code>
<code>cd</code> <code>memcache-3.0.8</code>
<code> </code><code>進入解壓以後的目錄,是沒有configure檔案的,需要執行 </code><code>/usr/local/php/bin/phpize</code>
<code> </code><code>.</code><code>/configure</code> <code>--with-php-config=</code><code>/usr/local/php/bin/php-config</code>
<code> </code><code>make</code> <code>&& </code><code>make</code> <code>install</code>
編輯php.ini檔案,在裡面添加以下行
<code>extension=memcache.so</code>
redis的子產品添加與memcached的一樣
編譯完成後同樣需要添加extesion檔案
本文以及驗證通過,此處不在給出驗證結果
本文轉自wangfeng7399 51CTO部落格,原文連結:http://blog.51cto.com/wangfeng7399/1600625,如需轉載請自行聯系原作者