In windows, how does one install redis and php redis extension? First Download a redis installation package: windows: code. google. compservicestackwikiRedisWindowsDownloadlinux: code. google. compredisdownloadslistredis-redis installation in windows and php redis extension installation
?
First Download a redis installation package:
Windows: http://code.google.com/p/servicestack/wiki/RedisWindowsDownload
Http://code.google.com/p/redis/downloads/list: linux
Redis-2.0.0 version :? Redis-2.0.0 (186)
Redis-2.4.5 version :? Redis-2.4.5-win32-win64.zip (61)
Decompress the package and obtain a redis folder. open the folder to obtain the following files:
Redis. conf is not provided in the installation package. you can search for the configuration on the Internet or download redis. conf (324) directly from here)
After downloading the redis. conf file, place it in the following location!
With the command line, switch to the redis' root directory, and then start the redisservice, that is, redis-server.exe, for example:
After the startup is as follows:
The current server does not have one client connection, so 0 clients is displayed,
Start two clients, for example:
It is worth noting that when you initialize redis-cli.exe, the server does not detect the existence of the client, that is, the server detects this status only after the first operation is performed on the client.
Installing the redis extension of php in windows is very simple. download a. dll extension package and put it in the ext directory of php. add a line of configuration in php. ini.
Php5.3 redis extension package: php_redis-5.3.zip (732)
Decompress the package and put it in the php ext Directory. open php. ini and add a line:
?
1 |
extension=php_redis.dll
|
Restart apache, nginx, or IIS.
Check whether the installation is successful. you can open phpinfo to see: