Redis Series (i)

Source: Internet
Author: User
Tags redis download redis version redis cluster install redis

Excerpt from: Redis Chinese web (http://www.redis.net.cn/)

Redis is an open source (BSD licensed), memory-stored data structure server that can be used as a database, cache, and Message Queuing agent. It supports data types such as strings, hash tables, lists, collections, ordered collections, bitmaps, hyperloglogs, and so on. Built-in replication, LUA scripting, LRU retract, transactions, and different levels of disk persistence, while providing high availability through Redis Sentinel, automatic partitioning via Redis cluster.

Redis download

Redis 3.2.1 is the latest stable version. Click Download.
If you are interested in a beta version or an unstable version, see more Redis downloads.

The Redis version number is in standard practice: The major version number. The patch level , a sub-version number is marked as a standard release, such as 1.2,2.0,2.2,2.4,2.6,2.8, the odd version number is used to denote a non-standard version, For example, the 2.9.x release is a non-standard release version of the Redis 3.0 standard version.

How to install Windows under installation

:https://github.com/dmajkic/redis/downloads.

Redis supports 32bit and 64bit to download. Depending on your actual situation, select the 64bit content CP to the custom drive letter installation directory named Redis. such as C:\reids

Open a CMD window using the CD command to switch directories to C:\redis run redis-server.exe redis.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.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

Download, unzip, compile:

    1. $ wget http://download.redis.io/releases/redis-3.0.6.tar.gz
    2. $ tar xzf redis-3.0. 6.tar. GZ
    3. $ cd Redis-3.0. 6
    4. $ make

Binaries are compiled in the src directory, including the Redis service program Redis-server, and the client program REDIS-CLI for testing.

Run the service as follows:

    1. $ src/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, relative or absolute path. We can use our own configuration files as needed.

You can use Redis's built-in client to write Redis code:

    1. $ src/redis-CLI
    2. Redis> set foo bar
    3. Ok
    4. Redis> get foo
    5. "Bar"

Install under Ubuntu

In Ubuntu system installation Redi can use the following command:

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

The above command will open the following terminal:

    1. Redis 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.

    1. Redis 127.0. 0.1:6379> ping
    2. PONG

The above indicates that we have successfully installed Redis.

Redis Series (i)

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.