Installation and basic operation of Redis under Windows (Update in ~ ~ ~)

Source: Internet
Author: User
Tags install redis

Installation under Redis installation window

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

Redis supports 32-bit and 64-bit. This need according to the actual situation of your system platform choice, here we download redis-x64-xxx.zip compressed package to C drive, after decompression, the folder renamed to Redis.

Open a cmd window using the CD command to switch directories to C:\redis run redis-server.exe redis.windows.conf .

If you want to be convenient, you can add the path of Redis to the environment variables of the system, so as to save the path again, the latter redis.windows.conf can be omitted, if omitted, the default is enabled. After entering, the following interface is displayed:

At this time another cmd window, the original do not close, otherwise you will not be able to access the server.

Switch to the Redis directory to run the redis-cli.exe-h 127.0.0.1-p 6379 .

Set the key-value pair set MyKey ABC

Remove key value pair get MyKey

Install under Linux

:http://redis.io/download, download the latest version of the document.

The latest version of the document used in this tutorial is 2.8.17, download and install:

$ wget http://download.redis.io/releases/redis-2.8.17.tar.gz$ tar xzf redis-2.8.  17.tar.  gz$ CD Redis-2.8.  $              make

After make the redis-2.8.17 directory will appear after the compiled Redis service program Redis-server, as well as the client program for testing REDIS-CLI, two programs located in the installation directory SRC directory:

Start the Redis service below.

./Redis-server  

Note this way of starting Redis is using the default configuration. You can also tell Redis to start with the following command using the specified configuration file through the startup parameters.

./Redis-server Redis.  conf    

Redis.conf is a default configuration file. We can use our own configuration files as needed.

Once the Redis service process is started, you can use the test client program REDIS-CLI to interact with the Redis service. Like what:

./Redis-cliredis>set foo barokredis>get foo"Bar"  
Install under Ubuntu

In Ubuntu system installation Redi can use the following command:

$sudo apt-get update$sudo apt-get install Redis-server   
Start Redis
$ redis-server 
See if Redis starts?
$ redis-CLI 

The above command will open the following terminal:

127.0.  0.1:6379>    

127.0.0.1 is the native IP, and 6379 is the Redis service port. Now let's enter the PING command.

127.0.  0.1:6379> pingpong     

The above indicates that we have successfully installed Redis.

Reproduced in http://www.runoob.com/redis/redis-install.html beginners can be learned and learned on the above.

Installation and basic operation of Redis under Windows (Update in ~ ~ ~)

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.