[Mac] Install MAMP's PHPredis extension

1 Download the phpredis extension installation package

cd /usr/local
git clone https://github.com/nicolasff/phpredis.git

2 Do the following in sequence to complete the installation

$  /Applications/MAMP/bin/php/php7.0.15/bin/phpize
$  ./configure --with-php-config=/Applications/MAMP/bin/php/php7.0.15/bin/php-config
$ make
$ make install

3 After the installation is successful, redis.so will be copied to the /Applications/MAMP/bin/php/php7.0.15/lib/php/extensions/no-debug-non-zts-20151012 directory.

  If it does not exist, manually copy the redis.so in the phpredis/modules directory. So far, the phpredis extension has been installed successfully.

 

4 mamp php.ini

i.e.  php.ini add a line to:   

extension = redis.so

Just restart the service

 

 5 View phpinfo 

 

Guess you like

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