How do I install the phpredis extension under Mac

  • 2020-05-14 05:26:30
  • OfStack

The development environment was recently moved from windows to Mac, and all the environments had to be reconfigured. Because Mac is based on the unix system is not familiar with, so I have encountered a lot of problems, the following site for you to sort out and share with you.

Install the phpredis extension:

First of all, everyone to download phpredis expansion pack, this is the address https: / / nodeload github. com nicolasff/phpredis zip/master (suggest you manually download and then to copy).

Second, you use the command to enter the folder


cd phpredis-master/ 
 phpize Commands (commands can cause problems, see the end of this article for solutions)
 ./configure --with-php-config=/usr/bin/php-config
 make
 sudo make install (execute the above commands in turn)
 # That's when it's prompted 1 A path
 # /usr/lib/php/extensions/no-debug-non-zts-20100525/
 # Indicates that the extension has been placed in that location
 vim /etc/php.ini
 # Add the following
 extension=redis.so
 # restart apache
 sudo apachectl restart
 # View the extension installation
 php -m |grep redis
 # appear redis Indicates successful installation

That's all about installing the phpredis extension under Mac. Enjoy!


Related articles: