Windows platform configuration phpredis environment

redis Configuration

Redis supports 32-bit and 64-bit. This according to the actual circumstances of your system platform selection, here we Redis-x64-xxx.zip download archive to the D drive, unzip the folder renamed redis.

Redis Download
Here Insert Picture Description

Open a cmd window cd to the directory to D: \ redis run:

redis-server.exe redis.windows.conf

If you want convenience, you can put the path redis added to the system environment variable, so you lose save path, and that redis.windows.conf back can be omitted, if omitted, the default is enabled. After entering, it will display the following screen:
Here Insert Picture Description

This time another start a cmd window, do not close the original, otherwise they can not access the server.

Redis run switch to the directory:

redis-cli.exe -h 127.0.0.1 -p 6379

Set key-value pair:

set myKey abc

Remove the key-value pairs:

get myKey

Here Insert Picture Description
Operation Command successfully explained successfully configured redis, the next configuration phpredis

phpredis Configuration

phpredis Extended Download: https://windows.php.net/downloads/pecl/releases/redis/

Extending the sequence: http://windows.php.net/downloads/pecl/releases/igbinary/ (and use the same phpredis)

  1. Above extensions downloaded on demand, presentation environment using php5.45, nginx set up the service, download the phpredis2.2.7-nts in Fig.
    Here Insert Picture Description
    Here Insert Picture Description
  2. Unzip the file directory phpredis Figure (igbinary extend the same):
    Here Insert Picture Description
  3. The above copy files into the directory file php ext directory FIG (igbinary extended same):
    Here Insert Picture Description
  4. Modify the php.ini file on the file extension=php_redis.dllopen in FIG extension:

It should be noted extension=php_igbinary.dllon the extension=php_redis.dllfront

Here Insert Picture Description
6. The above operation ends to restart nginx syntax phpinfo () can check whether the extended properly introduced, as indicated to be incorporated properly:
Here Insert Picture Description
7. The Redis the DEMO test, the test results are shown:
Here Insert Picture Description
Here Insert Picture Description

Published 156 original articles · won praise 531 · views 110 000 +

Guess you like

Origin blog.csdn.net/qq_39043923/article/details/98870676