安裝PHP擴展

三板斧:下載,解壓,安裝

redis擴展

wget -c https://github.com/phpredis/phpredis/archive/php7.zip
unzip php7.zip
phpize
./configure --with-php-config=/usr/local/php/bin/php-config
/usr/local/php7/etc/php.ini中加入extension=redis.so

memchche.so
參考http://www.cnblogs.com/luyucheng/p/6232349.html
fastdfs_client.so
http://blog.csdn.net/ssoul_liu/article/details/51059139
swoole.so
http://pecl.php.net/package/swoole
zookeeper.so
http://pecl.php.net/package/zookeeper
fileinfo.so
http://www.cnblogs.com/guansixu/p/7058295.html

安裝libevent.so出現的問題

configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.

于是百度找解決方法

wget https://sourceforge.net/projects/re2c/files/0.16/re2c-0.16.tar.gz
tar zxf re2c-0.16.tar.gz && cd re2c-0.16
./configure
make && make install
error: Cannot find libevent headers
wget http://cloud.github.com/downloads/libevent/libevent/libevent-2.0.20-stable.tar.gz
tar zxvf libevent-2.0.20-stable.tar.gz
cd libevent-2.0.20-stable/
./configure --prefix=/usr/local/libevent-2.0.20-stable/
make
make install
 cd libevent-0.1.0
/usr/local/php/bin/phpize
 ./configure --with-php-config=/usr/local/php/bin/php-config --with-libevent=/usr/local/libevent-2.0.20-stable
 make && make install

安裝多線程

pecl install phreads.so

extension="pthreads.so"
最后編輯于
?著作權歸作者所有,轉載或內容合作請聯系作者
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發布,文章內容僅代表作者本人觀點,簡書系信息發布平臺,僅提供信息存儲服務。

推薦閱讀更多精彩內容