1. Use the phpinfo() function to view the PHP version information, which will determine the extension file version.
2. Download php_igbinary-2.0.1-7.0-ts-vc14-x64.zip, php_redis-3.1.3rc2-7.0-ts-vc14-x64.zip (must ensure the correct version)
Download address: [Select the appropriate version]
http://windows.php.net/downloads/pecl/snaps/redis/
http://windows.php.net/downloads/pecl/releases/igbinary/
ps: If you see php7ts.dll in the PHP directory, select the ts version
3. After decompression, copy php_redis.dll and php_redis.pdb to the ext directory of php
4. Modify php.ini, (PS: this php.ini file is in the Apache directory) and add:
; php_redis
extension=php_igbinary.dll
extension=php_redis.dll
Note: extension=php_igbinary.dll must be placed in front of extension=php_redis.dll, otherwise this extension will not take effect
5. After restarting Apache, use phpinfo to check whether the extension is successfully installed
6. After opening the redis service, you can use the following test to test whether it can be called.
1 2 3 4 5 6 7 8 9 10 |
|
ps: The local redis service must be enabled before running [download address: https://redis.io/download]
In fact, Redis can be installed as a windows service, and it starts automatically at boot. The command is as follows:
1 |
|
After installation, you can see that redis has been used as a windows service:
But after installation, Redis did not start,
The startup command is as follows:
1 |
|
stop command:
1 |
|
Multiple instances can also be installed
1 2 3 4 5 6 |
|
Uninstall command:
1 |
|