Windows Redis installation and the Redis extension installation for PHP
?
First, download a Redis installation package:
Windows:http://code.google.com/p/servicestack/wiki/rediswindowsdownload
Linux:http://code.google.com/p/redis/downloads/list
redis-2.0.0 version:? redis-2.0.0 (186)
redis-2.4.5 version:? Redis-2.4.5-win32-win64.zip (61)
After extracting, get a Redis folder and open the folder to get some files like:
The installation package is not provided redis.conf, about the configuration can be searched online, or directly download from here: redis.conf (324)
After downloading, you can put the redis.conf in the location shown!
Using the command line, switch to the Redis root directory and start the Redis server as Redis-server.exe, such as:
Start with the following:
The current server does not have 1 client connections, so 0 clients is displayed,
Now start two clients separately, such as:
It is important to note that when you log in to Redis-cli.exe, the server does not detect the presence of the client, that is, after the client performs the first operation, the server detects this state.
The Redis extension for installing PHP under Windows is very simple, download a. dll extension package into the PHP ext directory, and add a line of configuration to the php.ini.
The php5.3 version of the Redis expansion pack is available here: Php_redis-5.3.zip (732)
Unzip and put in the PHP ext directory, open php.ini, add a line:
?
1 |
extension=php_redis.dll
|
Then, restart Apache or Nginx or IIS.
To detect if the installation was successful, you can open phpinfo to see: