Recently, the development environment has been transferred from Windows to Mac, and all environments have to be configured again. Because the MAC is based on UNIX system is not very familiar with, so encountered a lot of problems, the following small series for everyone to share.
Install Phpredis Extensions:
first of all, we first download Phpredis expansion package , this is the address https://nodeload.github.com/nicolasff/phpredis/zip/master (we recommend that you manually download and then replicate).
Second, everyone uses the command to enter the folder
Copy Code code as follows:
CD phpredis-master/
phpize Command (command may be problematic, see article tail)
./configure--with-php-config=/usr/bin/php-config
Make
sudo make install (execute the above command sequentially)
# This will prompt a path
#/usr/lib/php/extensions/no-debug-non-zts-20100525/
# indicates that the extension has been placed at that location
Vim/etc/php.ini
#增加如下内容
Extension=redis.so
#重启apache
sudo apachectl restart
#查看扩展安装情况
Php-m |grep Redis
#出现 Redis indicates successful installation
The above is installed under the Mac Phpredis expansion of all the introduction, I hope you like.