Redis--linux System Download install and run Redis

Source: Internet
Author: User
Tags redis download

Redis Installation
About Redis

Redis is fully open source free, adheres to the BSD protocol and is a high-performance Key-value database.

Redis and other Key-value cache products have the following three features:

    • Redis supports data persistence, which saves data in memory on disk and can be loaded again for use when restarting.
    • Redis not only supports simple key-value types of data, but also provides storage of data structures such as List,set,zset,hash.
    • Redis supports backup of data, that is, Master-slave mode of data backup.

Redis Benefits
    • The performance is very high –redis can read the speed is 110,000 times/s, the write speed is 81,000 times/s.
    • Rich data types –redis support binary case Strings, Lists, hashes, sets and Ordered sets data type operations.
    • Atomic –redis All operations are atomic, meaning either successful execution or failure to execute at all. A single operation is atomic. Multiple operations also support transactions, namely atomicity, wrapped by multi and EXEC commands.
    • Rich features –redis also supports publish/subscribe, notifications, key expiration, and more
Redis download
Installation

Download, unzip, compile:

$ wget http://download.redis.io/releases/redis-4.0.8.tar.gz$ tar xzf redis-4.0.8.tar.gz$ cd redis-4.0.8$ make

Binary files are compiled after completion in the SRC directory, start the Redis service with the following command:

$ src/redis-server

You can use the built-in client command redis-cli:

$ src/redis-cliredis> set foo barOKredis> get foo"bar"

The use of Redis

Used in Linux:

redis operations: Linux boot: src/redis-server redis.conf View process:        -NTLP View details, with IP address            ifconfig kill process                 -911148
Locate the Process ps-e|grep keyword (for example, Redis) to view text content vim redis.conf exit and save content ZZ view detailed ls into redis directory CD Red is-4.0. 8 . tar.gz Turn off firewall systemctl Stop firewalld.service View firewall status firewall-cmd--state
The steps are as follows:
1. Enter the Redis directory and start

2. Configure the redis.conf file.
Note Bind 127.0.0.1 First, or you cannot connect to another IP

Daemonizze no change to daemonize Yes

AppendOnly no change to appendonly Yes

Open the comment here, then add the password for a long time.

3. Turn off the firewall

Systemctl Stop Firewalld.service #关闭防火墙
Firewall-cmd--state #查看防火墙是否关闭 not running
#这样window才可以调用linux

Application in window:

Running Redis in Linux, and window calls Redis in Linux

1, first Redis in Linux to start,
2, Import Redis
3,r=redis. Redis (host= "IP address in Linux", password= "password", port=6379) ps:port default is 6379
4,r.set (' A ', ' B ') #加入内容

Redis--linux System Download install and run Redis

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.