Redis installation using under Windows

Source: Internet
Author: User

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);
}

}
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.