The first step for Redis installation:
1, first confirm that the download package is 64-bit or 32-bit
2. Download Http://code.google.com/p/servicestack/downloads
3. Unzip the download package to get the following files:
Cygwin1.dll
Redis-benchmark.exe//performance test to simulate simultaneous n clients sending M sets/gets queries
Redis-check-aof.exe//update log check
Redis-check-dump.exe//Local database check
Redis-cli.exe
Redis-server.exe Service Program
redis.conf configuration file
4, unzip the installation file into the D-disk directory, the folder renamed to Redis (easy to explain below), configuration redis.conf, (do not configure, the default is good)
5. Start Redis
Open the cmd window and enter the command:
Turn on the Redis command
Redis-server.exe redis.windows.conf
1) d:
CD Redis//To the Redis directory, you can also add Redis to the system variable
2) Redis-server.exe redis.conf
Turn on Redis success,
6. Another cmd window input command:
Redis-cli.exe-h 127.0.0.1-p 6379
The following can be tested in this window:
Input: Set Key1 HelloWorld
Get Key1
If the output: HelloWorld indicates that your Redis has been installed successfully
Open command Redis-server.exe redis.windows.conf
Next step: Php extended redis feature, download https://github.com/nicolasff/phpredis/downloads
1 First, view the compiled version of PHP v6/v9 in Phpinfo ()
My is MSVC9 (Visual C + + 2008) So the download is phpredis_5.4_vc9_ts.7z
2 Put the downloaded Php_igbinary.dll, php_redis.dll in the PHP extension directory (EXT), and modify the configuration file php.ini
Extension=php_igbinary.dll
Extension=php_redis.dll
3 Restart the service, view Phpinfo (), find the following to indicate success;
Redis
Redis Support Enabled
Redis Version 2.2.3
4 Testing with PHP
<?php
Phpinfo ();
$redis = new Redis ();
$redis->connect ("127.0.0.1", "6379");
$redis->set ("Key1", "Hello World");
echo $redis->get ("Key1");
?>
5:php Operation Reds Command http://www.cnblogs.com/jackluo/p/3412670.html
6:redis Command Chinese document: http://redisdoc.com/
Installing Redis under windows and testing