Recently, the development environment has been transferred from Windows to the Mac, and all the environments have to be reconfigured. Because the Mac is not familiar with UNIX-based systems, it encounters a lot of problems.
To install the Phpredis extension:
First of all, we first download the Phpredis expansion pack, which is the address https://nodeload.github.com/nicolasff/phpredis/zip/master (we recommend that you manually download and then copy).
Second, you use the command to enter the folder
1 cd phpredis-master/ 2phpize Command (command may be problematic) 3 ./configure--with-php-c/bin/ php-config 4 make 5sudomakeinstall (Execute the above command sequentially) 6# This will prompt a path 7 #/usr/lib/php/extensions/no-debug-non-zts- 20100525/ 8# indicates that the extension has been placed at that position 9 vim/etc/php.ini# Add the following: extension=redis.so#重启apachesudo apachectl Restart#查看扩展安装情况 php-m | grep Redis #出现 Redis indicates successful installation
Please note that execution of the phpize command may be an error, please refer to:
Reference: http://my.oschina.net/Twitter/blog/287544
The above describes the Mac configuration Phpredis extension, including the aspects of the content, I hope that the PHP tutorial interested in a friend helpful.