Mac installs php-redis extension for php7

Note: Operating system version 10.13.3, other versions of Mac systems should also work

  1. Install first
    . Execute the following commands on the command line in order. If the current user authority is not enough, execute the command plus sudo

    cd /usr/local/Cellar    //我是安装到Cellar目录下了
    git clone https://github.com/phpredis/phpredis.git 
    cd phpredis 
    phpize //phpize是用来扩展php扩展模块的,通过phpize可以建立php的外挂模块 
    make //编译程序 
    make install
  2. Configuration extension
    In the php configuration file (my computer's php.ini is under /usr/local/etc, this depends on the situation) plus

    extension=redis.so
  3. 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

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325908739&siteId=291194637