Getting started with installing redis under windows

1. Introduction to
redis Redis is a key-value storage system. Similar to Memcached, it supports relatively more value types to be stored, including string (string), list (linked list), set (collection), zset (sorted set -- ordered collection) and hashs (hash type). These data types all support push/pop, add/remove, intersection union and difference, and richer operations, and these operations are atomic. On this basis, redis supports sorting in various ways. Like memcached, data is cached in memory to ensure efficiency. The difference is that redis will periodically write updated data to disk or write modification operations to additional record files, and on this basis achieve master-slave (master-slave) synchronization.

Redis is a high-performance key-value database. The emergence of redis has largely compensated for the insufficiency of key/value storage such as memcached, and can be a good complement to relational databases in some occasions. It provides Python, Ruby, Erlang, PHP clients and is very easy to use.


2. Install redis download address under windows https://github.com/dmajkic/redis/downloads . The downloaded Redis supports 32bit and 64bit. According to my actual situation, I choose 32bit. Extract the contents of the 32bit file to the specified path, for example: E:\redis-2.4.5-win32-win64\32bit.

Start--enter cmd, open the cmd window, use the cd command to switch to the specified directory (E:\redis-2.4.5-win32-win64\32bit), and run redis-server.exe redis.conf . After running, the following interface will appear.

 
This means that the Redis server has been successfully installed.

Reopen a cmd window, use the cd command to switch to the specified directory (E:\redis-2.4.5-win32-win64\32bit) and run redis-cli.exe -h 127.0.0.1 -p 6379 -a 123456, of which 127.0. 0.1 is the local ip, 6379 is the default port of the redis server, and 123456 is the redis password. The operation is successful as shown in the following figure.
In this way, the construction in the Redis windows environment has been completed, is it very simple?

 
In this way, the construction in the Redis windows environment has been completed, is it very simple?

The environment has been set up, and it must be tested. For example: store a string whose key is test and value is hello word, and then get the key value.


 
The hell word is output correctly, and the test is successful!

Note: Every time you start, you must start the server first, namely: redis-server.exe redis.conf and then start the client in another window: redis-cli.exe -h 127.0.0.1 -p 6379 -a 123456 to start the operation .

 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326611559&siteId=291194637
Recommended