The Nosql Redis database

Source: Internet
Author: User
Tags log log install redis

1. Getting Started with Redis basics
2. Redis Application Advanced

First, the concept
Redis is an open source key-value, which is cache and storage, supports persistence, enables a meaningful high availability with sentinel, data structure server: String,list,hash,set, sorted Set,bitmap,hyperloglog
Four types of NoSQL genres:
Key-value Key-value: Memcached Redis
Documemtation Document Type: Mongodb
Columu Family column type: Hbase
Graph Image Type: neo4j

Two, install Redis
Www.redis.io redis-3.0.2-1.el6.remi.x86_64.rpm
Rpm-ivh redis-3.0.2-1.el6.remi.x86_64.rpm
RPM-QL View installation file
Cp/etc/redis.conf{,.bak}
vim/etc/redis.conf profile introduction
daemonize no daemon
Port 6379
Tcp-backlog 511 #tcp The waiting queue for the request
bind 127.0.0.1 The address of the default listener, you need to specify your own IP address
such as bind 127.0.0.1 192.168.100.6
Timeout 0 Client link time-out, 0 means disable this feature, do not time out
loglevel notice log level
Logfile/var/log/redis/redis.log log file
Databases 16 Redis Support (0-15 libraries), select 0 Choose 0 Library, distributed does not support multi-Library form
-----------------Snapshot-------------------------------------------
Save seconds Changes
Save 900 1 900 seconds 1 records send changes, record snapshot
Save "
Save" 10000
Save "to prohibit the persistence feature, only cache, you need to comment the above three lines br>----------------Master-slave--------------------------------
slaveof masterip masterport
salveof Primary IP primary port, If starting this is from the server, otherwise the primary
is only enabled, the following master-slave parameters will take effect.
-----------------secyrutty Security---------------------------------
Requirepass foobared

-------------------LIMITS Limit--------------------------------------------------
MaxClients 10000 maximum number of concurrent clients
MaxMemory <bytes> maximum use memory space capacity
-------------------APPEND only MODE-------------------------------
AppendOnly No default is disabled, equivalent to binary log

Iii. Common Commands
#redis-cli-h View Help
#redis-cli-h 192.168.100.6 Remote link
Redis>help @STRING See what commands, from which version
Redis>help Set
Redis>set key value such as set name Lisan
Redis>get Key
"Lisan"

IV. Application of Advanced
How Redis implements the authentication function, in the configuration file VI etc/redis.conf
Requirepass 123456 #123456为密码, restart effective
#redis-cli-h 192.168.100.6

Select 0, prompting for authentication information
AUTH 123456
OK, Certification passed

The Nosql Redis database

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.