Note: Operating system version 10.13.3, other versions of Mac systems should also work
Install first
. Execute the following commands on the command line in order. If the current user authority is not enough, execute the command plus sudocd /usr/local/Cellar //我是安装到Cellar目录下了 git clone https://github.com/phpredis/phpredis.git cd phpredis phpize //phpize是用来扩展php扩展模块的,通过phpize可以建立php的外挂模块 make //编译程序 make install
Configuration extension
In the php configuration file (my computer's php.ini is under /usr/local/etc, this depends on the situation) plusextension=redis.so
Restart the server and use the php_info() function to check whether php supports the redis extension
Reference for this article: https://blog.csdn.net/qq_34908844/article/details/76945298
If you need to reprint, please indicate the source: http://www.cnblogs.com/zhuchenglin/p/8858614.html