一、先安装autoconf扩展(因为git下来的phpredis没有configure文件夹会报错,所以只能自动安装了)
安装的版本包也不能错:
tar -xzvf m4-1.4.13.tar.gz
cd m4-1.4.13
./configure –prefix=/usr/local
make
sudo make install
cd ..
tar -xzvf autoconf-2.65.tar.gz
cd autoconf-2.65
./configure –prefix=/usr/local # ironic, isn’t it?
make
sudo make install
cd ..
# here you might want to restart your terminal session, to ensure the new autoconf is picked up and used in the rest of the script
tar xzvf automake-1.11.tar.gz
cd automake-1.11
./configure –prefix=/usr/local
make
sudo make install
cd ..
tar xzvf libtool-2.2.6b.tar.gz
cd libtool-2.2.6b
./configure –prefix=/usr/local
make
sudo make install
好了,现在去找automake管理makefile的源码就可以轻松使用了
二、安装PHPredis
git clone https://github.com/nicolasff/phpredis
phpize(切换到phpredis目录执行)
./configure -with-php-config=/Applications/MAMP/bin/php/php5.5.10/bin/php-config
make
make install(切换到sudo执行)
然后打开php.ini
extension_dir = “/Applications/MAMP/bin/php/php5.5.10/lib/php/extensions/no-debug-non-zts-20121212/” (这个目录在安装install结束时候会提示)
extension = redis.so
重启服务,用PHPinfo() 查看下 是否安装好了redis
小杰博客 , 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:mamppro 安装 PHPredis扩展