- 安裝
- 透過PECL
pecl install igbinary
- 透過Source Code
- 下載igbinary.tgz
wget https://pecl.php.net/get/igbinary-2.0.0.tgz
- Install
#1 以igbinary-2.0.0.tgz為例
cd {install}/
#安裝igbinary-2.0.0.tgz
$ tar zxvf igbinary-2.0.0.tgz
$ cd igbinary-2.0.0..tgz/
$ phpize
$ ./configure
$ make && make install
如果./configure出現 no acceptable C compiler found in $PATH 需安裝gcc
- 檢查是否有igbinary.so
$ ll /usr/lib64/php/modules/ | grep igbinary.so
-rwxr-xr-x 1 root root 312644 Dec 20 07:40 igbinary.so
- 編輯將igbinary.ini
$ vi /etc/php.d/igbinary.ini
============= 我是分隔線 =================
; Enable igbinary extension module
extension=igbinary.so
; Enable or disable compacting of duplicate strings
; The default is On. igbinary.compact_strings=On
; Use igbinary as session serializer
session.serialize_handler=igbinary
; Use igbinary as APC serializer
apc.serializer=igbinary # php7後,還沒試過
- 重新啟動apache
$ service httpd restart
$ php -m | grep igbinary #檢查是否安裝成功
igbinary
沒有留言:
張貼留言