Install redis in windows and windows redis

Source: Internet
Author: User

Install redis in windows and windows redis

Recently, due to the company's project, I went to Kunming for a business trip. I learned a lot about installing redis and configuring sentinel for the first time, but it was just a bit of a fur. I wrote down what I learned in this article.

 

  1. First, we will introduce redis from Baidu encyclopedia.

   Redis is a key-value storage system. Similar to Memcached, Memcached supports more storage value types, including string, list, set, and zset) and hash (hash type ). These data types support push/pop, add/remove, Intersection Set and difference set, and more abundant operations, and these operations are atomic. On this basis, redis supports sorting in different ways. Like memcached, data is cached in the memory to ensure efficiency. The difference is that redis periodically writes the updated data to the disk or writes the modification operation to the append record file, and on this basis implements master-slave (master-slave) synchronization. Redis is a high-performance key-value database. The emergence of redis largely compensates for the shortage of key/value storage such as memcached, and can play a good complementary role in relational databases in some cases. It provides clients such as Java, C/C ++, C #, PHP, JavaScript, Perl, Object-C, Python, Ruby, and Erlang for ease of use. [1] Redis supports master-slave synchronization. Data can be synchronized from the master server to any number of slave servers. The slave server can be the master server associated with other slave servers. This allows Redis to perform single-layer tree replication. You can intentionally or unintentionally write data to a disk. Because the publishing/subscription mechanism is fully implemented, you can subscribe to a channel and receive the complete message publishing records of the master server when synchronizing the tree from the database anywhere. Synchronization is helpful for the scalability and data redundancy of read operations. The official redis website address is redis. io. (I specifically checked that the domain name suffix I/O belongs to the national domain name, which is the british Indian Ocean territory, that is, the british Indian Ocean territory) Currently, Vmware is funding the development and maintenance of redis projects. 2. Download redis   Here I installed the redis-window-64bit-2.8.19 version, so I will give the link to the version I installed: https://pan.baidu.com/s/1hr6gbZI password: sf95 3. Install redisAfter downloading the file, decompress the file locally. For example, if the file is stored in C: \ redis2.8-64bit, it can be started by default. Check redis again if it is not correct. windos. conf, port default port 6379 other do not need to change, directly start cmd to enter C: \ redis2.8-64bit, and then Command redis redis-server.exe. windows. conf to start redis, as shown in.   

Here we can see the redis version, because it is the second time to start, it will read the data stored previously from the hard disk, DB loaded from disk

 

  4. Test redis

This is the started server. Then we start the client to try to connect to the redis server and test whether the redis service is normal. We also start another cmd window, go to the redis main directory, and run the following command:

Reids-cli.exe

Ignore my directory, because I am using a mac, installed windows 32-bit virtual machine, the download provided by the connection is 64-bit (Kunming has been tested on the current network, available, 32-64-bit configuration is the same)

Note that if you use redis before. windows ,. bind configuration in conf comment out or configure bind 127.0.0.1, then start can be directly started with the redis-cli.exe, if the configuration is the local ip, such as bind 10.211.55.3  

 

 

So you must use redis-cli.exe-h 10.211.55.3-p 6379 to start (someone may ask, the default configuration is not enough, why do you want to configure your own local ip? Used in sentinel configuration later)

 

After the client is started, write a simple test.

First, test get redisTest. There is no value.

Then set redisTest 1231231, store it, and get it. It is as simple as storing it.

 

The following blog post explains the configuration file

Configuration File explanation: http://blog.csdn.net/l1028386804/article/details/51869081

As for how to use redis, I am familiar with Baidu and many tutorials.

 

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.