• 欢迎访问小杰博客网站
  • 欢迎访问小杰博客网站哦

mamppro 安装 PHPredis扩展

linux 小杰 6年前 (2017-03-29) 1551次浏览 已收录 0个评论

一、先安装autoconf扩展(因为git下来的phpredis没有configure文件夹会报错,所以只能自动安装了)

安装的版本包也不能错:

curl -O http://mirrors.kernel.org/gnu/m4/m4-1.4.13.tar.gz

tar -xzvf m4-1.4.13.tar.gz

cd m4-1.4.13

./configure –prefix=/usr/local

make

sudo make install

cd ..

curl -O http://mirrors.kernel.org/gnu/autoconf/autoconf-2.65.tar.gz

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

curl -O http://mirrors.kernel.org/gnu/automake/automake-1.11.tar.gz

tar xzvf automake-1.11.tar.gz

cd automake-1.11

./configure –prefix=/usr/local

make

sudo make install

cd ..

curl -O http://mirrors.kernel.org/gnu/libtool/libtool-2.2.6b.tar.gz

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扩展
喜欢 (0)
发表我的评论
取消评论
表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址