安装PHP扩展
2017-08-19 本文已影响0人
小慕先森
三板斧:下载,解压,安装
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"