1, download the Redis Windows application, support 32-bit and 64-bit, according to the actual situation download
: Https://github.com/dmajkic/redis/downloads
2, copy the corresponding program to the directory you need, where I use the 64-bit, put in the E:\redis directory
3. Start Redis server: Open a CMD window, first switch to Redis directory (E:\redis), run Redis-server.exe redis.conf
Note Redis.conf is a configuration file that primarily configures information such as the ports used by Redis (default redis.conf if not written)
There is no redis.conf in the Redis compression package that I downloaded, I put the default redis.conf file content at the end of the article.
Note: This window runs Windows for the Redis server, and Redis shuts down when it is closed.
4. Start the Redis client: Open a CMD window and run the command redis-cli.exe-h 127.0.0.1-p 6379 after entering the directory, then you can do it.
5. Download the redis PHP extension:
: Https://github.com/nicolasff/phpredis/downloads
According to the PHP version to download the appropriate extension, the version must correspond to
6, put Php_redis.dll and php_igbinary.dll into the PHP ext folder, and then php.ini Add code (note that the sequence of the two lines of code can not be reversed)
Extension=php_igbinary.dll
Extension=php_redis.dll
7. Restart the Web server
8. PHP Test
<?php new Redis (); $redis->connect ('127.0.0.1 ',$redis->set (' test ',$redis->get (' test ');? >
Installation of Redis Services and PHP extensions in the Win7 environment