我曾經手動編譯memcached棧,其中包括igbinary。這是在我開始使用remi repo之前,它提供了更新的軟件包,沒有手動編譯的所有開銷。
下面是當我用手動編譯igbinary我使用的注意事項:
Had to scp the source from another computer due to lack of direct links, the next steps assume pecl/memcached files are local and extracted
$ -> wget http://pecl.php.net/get/igbinary-1.1.1.tgz
$ -> tar -xzvf igbinary-1.1.1.tgz
$ -> cd igbinary-1.1.1
$ -> phpize
$ -> ./configure # No need for extra config params
$ -> make
$ -> make install # This should copy the resulting .so file to the php dir where all modules are stored
$ -> /etc/init.d/httpd restart # I remember having to do this for phpinfo to reflect the setting correctly after the udpate
現在,如果你(從CLI或php -i)查看您的phpinfo igbinary支持應設置爲yes。
- 更新 -
要確保你有在php.ini以下行或igbinary.ini PHP在哪裏可以讀取它:
; Enable igbinary extension module
extension=igbinary.so
- 更新#2 -
忘了提,你需要編譯如下標誌的memcached,以便它使用igbinary:
--enable-memcached-igbinary
- Update#3 -
如果有人在將來遇到這種情況。手工維護PHP堆棧以及常用的擴展是一件痛苦的事,通常不值得花費額外的努力。你最好使用你的發行版的軟件包管理器來處理所有繁重的任務,與igbinary支持memcached的安裝PHP會是什麼樣子的例子:
yum install php php-cli php-pecl-memcached php-pecl-igbinary
如果你的發行版的PHP的上游版本是舊的,你想使用更新的版本,看看REMI回購:http://blog.famillecollet.com/pages/Config-en
這是更多的問題:http://serverfault.com/這裏的用戶更多的是編程,所以你有一個更好的變化,以獲得答案在那裏。 – 2013-02-15 23:21:44