Redis is installed in Windows

Source: Internet
Author: User

The downloaded Windows version number is redis-2.0.2, extracted to the D drive:

D:\redis-2.0.2


In this folder, 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, used to simulate the same time by NA client sends M sets/gets queries (similar to Apache's AB tools).

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 form to remain open, and the Redis service shuts down when it is closed .

At this point the service opens, another form is opened, the client is set:

d:\redis-2.0.2>redis-cli.exe -H 202.117.16.133 -P 6379

Then you can start playing:



--------------------------------------------------------------------------------------------------------------- -----------------

Redis provides a client in multiple languages. Contains Java. C++,python.

The Redis official web recommended Java package is Jedis, to download Jedis. Importing the Jedis package in a Java project, starting an existing error, is due to the lack of org.apache.commons this package,

To find this package on the Internet, after downloading the import, Jedis there is no error.


To start, use 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);
}

}

Copyright notice: This article blog original articles, blogs, without consent, may not be reproduced.

Redis is installed in Windows

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.