Redis (1) Installation and testing in a Windows environment

Source: Internet
Author: User

First prepared to use Redis, a well-known NoSQL cache database.

Here is the first day, simply write the installation under Windows, some of the problems encountered, and then simply use and test, and then use and test in the code.

After the test in the production environment, the installation test under Linux, for the cache cluster, for the time being not ready to use, if you encounter later to explain.

The first is the download: a lot of online Baidu came out that the Windows version of the above on GitHub is Https://github.com/MSOpenTech/redis

But for many newbies (and I'm among them), GitHub is an open source project, not the actual files we need to install, the files we need to install are:

Https://github.com/MSOpenTech/redis/releases

Download the latest version.

Then unzip the installation directly

Run the following command in CMD mode, it should be easy to play Linux.

C:\users\xx>e:

E:\>CD redis-x64-3.2.100

E:\redis-x64-3.2.100>redis-server.exe redis.windows.conf

Then do not close this window, let the service open, and then open another CMD window

After entering the same directory

E:\redis-x64-3.2.100>redis-cli.exe-h localhost-p 6379

So we get into redis.

Then simply use the set and get commands to do the test.

Set key value [EX seconds] [PX milliseconds] [nx| XX]

When you enter set, you see the hints that appear, and you know the parameters.

The main attention to the following several, English is very simple I will not translate

    • EXSeconds-Set The specified expire time, in seconds.
    • PXMilliseconds-Set The specified expire time, in milliseconds.
    • NX--only set the key if it does not already exist.
    • XX--only set the key if it already exist.

The get command doesn't say much.

Tomorrow update how to use Redis in a Java project

Redis (1) Installation and testing in a Windows environment

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.