Home >Backend Development >PHP Tutorial >mac下PHP安装扩展phpreids

mac下PHP安装扩展phpreids

WBOY
WBOYOriginal
2016-06-20 12:31:211341browse

mac下PHP安装扩展phpreids

一.mac自带php安装phpredis

$ brew install php56-redis  #56为php版本5.6.10

二.mac下mamp安装phpredis

  1. 进入/Applications/MAMP/bin/php/php5.6.10/ 下载phpredis https://github.com/phpredis/phpredis
  2. 进入phpredis文件夹

     $ cd phpredis $ sudo phpize $ sudo ./configure --with-php-config=/Applications/MAMP/bin/php/php5.6.10/bin/php-config  #配置phpredis $ sudo make  #编译make $ sudo cp -p modules/redis.so /Applications/MAMP/bin/php/php5.6.10/lib/php/extensions/no-debug-non-zts-20131226 #将编译完成的模块,复制到MAMP 中的PHP 扩展中 $ sudo vi /Applications/MAMP/bin/php/php5.6.10/conf/php.ini $ extension=redis.so    #修改 php.ini 文件在增加 redis.so 扩展
  3. 最后完成,重启MAMP

截图.jpg

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn