The downloaded version of Windows is redis-2.0.2, extracted to the D disk:
D:\redis-2.0.2
In this directory, the following files are available:
redis-server.exe: Service Program
redis-check-dump.exe: Local Database check
redis-check-aof.exe: Update log check
redis-benchmark.exe: Performance test to simulate simultaneous nA client sends M sets/gets queries (similar to the Apache AB tool).
start the Redis service (conf file specifies the configuration file, default if not specified):
d:\redis-2.0.2>Redis-server.exe redis.conf
start the cmd window to remain open, and the Redis service shuts down when it is closed .
When the service is opened, another window is opened, and the client is set up:
d:\redis-2.0.2>redis-cli.exe -H 202.117.16.133 -P 6379
Then you can start playing:
--------------------------------------------------------------------------------------------------------------- -----------------
Redis provides clients in multiple languages, including Java,c++,python.
Redis official web recommended Java package is Jedis, to download Jedis, in the Java Project Import Jedis package, began to find errors, because of the lack of org.apache.commons this package,
To find this package on the Internet, after downloading the import, Jedis there is no error.
You can start by using Jedis to operate Redis:
PackageTest
ImportRedis.clients.jedis.Jedis;
Public classClient {
/**
* @paramargs
*/
Public Static voidMain (string[] args) {
//TODO auto-generated Method Stub
Jedis JJ =NewJedis ("localhost");
Jj.set ("Key1", "I am value 1");
String ss = Jj.get ("Key1");
SYSTEM.OUT.PRINTLN (ss);
}
}