mac下安装redis

时间:2021-11-08 19:58:39

安装php_redis.so

首先用git从https://github.com/nicolasff/phpredis下载源码。然后依次执行以下命令

sudo /Applications/XAMPP/xamppfiles/bin/phpize

sudo MACOSX_DEPLOYMENT_TARGET=10.7 CFLAGS="-arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp" CCFLAGS="-arch i386 -arch x86_64 -g -Os -pipe" CXXFLAGS="-arch i386 -arch x86_64 -g -Os -pipe" LDFLAGS="-arch i386 -arch x86_64 -bind_at_load" ./configure --enable-redis --with-php-config=/Applications/XAMPP/xamppfiles/bin/php-config

sudo make && sudo make install