Redis 2.6.6 release
Author: chszs, reprinted with note.Author blog homepage: http://blog.csdn.net/chszs
Redis is a high-performance memory key-value database. The emergence of redis largely makes up for the shortage of key/value storage such as
PHP Technology Exchange Group 170855791
PHP has multiple redis extensionsProgramI am using the phpredis Extension
First download the extension phpredis ,:Https://github.com/nicolasff/phpredis
After decompression, you can install the extension
Configure redis
You can run the redis-server command to directly start the service without any configuration information. All configurations use the default settings. To enable the configuration file, you can append the absolute path of the
1. Storage Method
Memecache stores all data in the memory. After the power is down, the data cannot exceed the memory size.
Some redis instances are stored on the hard disk to ensure data persistence.
2. supported data types
Memcache
# Redis configuration file example
# By default redis does not run as a daemon. Use 'yes' if you need it.# Note that redis will write a PID file in/var/run/redis. PID when daemonized.Daemonize No
# When run as a daemon, redis write a PID file in/
After learning about various redis types, this article introduces the redis sorting command. redis supports sorting list, set, and sorted set elements. The complete command format of the sort command is as follows:
Sort key [by pattern] [limit start
redis's support for transactions is still relatively simple. Redis can only ensure that the commands in the transaction initiated by one client can be executed continuously without inserting commands from other clients. Redis processes all client
This Article describes the redis sorting command. redis supports sorting list, set, and sorted set elements. The complete command format of the sort command is as follows: sort key [by pattern] [limit start count] [get pattern] [ASC | DESC]
PurposeInstall nginx, MySQL, PHP-FPM, and redis through yum in centos 6.2.
Environment preparationYou can install centos 6.2 on a USB flash drive.
Why is yum used for installation?In addition to the tarball method, install the software on Linux
From: http://www.cfanz.cn /? C = article & A = read & id = 32677
Reference http://www.open-open.com/lib/view/open1351324403395.html
Spring http://www.open-open.com/lib/list/354Data redis implements a subscription/Release System
Spring
Redis
Zadd key score member [[score member] [score member]...]
Set one or moreMemberElements andScoreValues are added to the sorted set.Key.
IfMemberIf it is already a member of the sorted set, update thisMemberOfScoreValue, and re-insert
Preface redis is often used for persistent storage in the project, but I don't know the principle of redis persistence. I will repost a blog here, so I can take a book note. Original article address: Workshop:
The client sends write operations to
Redis is a key-value memory database. Value provides the data structures in string, list, set, sort set, and hash 5.
Summary of commands and operation methods: It is really troublesome to write them one by one ,,,
Operations on a keys
1) DEL key
Learning any new knowledge is a step-by-step process. From Initial ignorance to simple familiarity, and then suddenly enlightened, the results are ecstatic and will be happy for a long time.Similar to redis + MySQL and memory + Hard Disk
First, see
Redis Snapshot
In the previous article, we learned how to implement redis Aof. In this article, we will learn another persistence method of redis: snapshot ).Like in the previous article, we will first introduce the relevant parameters, and then
Introduction
The current version of redis supports tcmalloc, jemalloc, Apple's malloc, or redis's own zmalloc. Zmalloc manages the memory allocation, which is thread-safe, and the allocated memory must be sizeof (long.Source code
Zmalloc. h
Introduction
The first two articles mainly introduce the epoll and socket encapsulation of redis. This article will introduce in detail the specific implementation of redis network communication. Simply put, redis's network communication mainly
Introduction
Because there is no string type in Standard C, Redis implements its own string sds.Source File
Sds. h sds. cAnalyze Data Structure
// Sds type typedef char * sds; // sdshdr structure struct sdshdr {// The length occupied by the buf
Redis is a high-performance key-value database that uses memory as the primary storage, and data access is very fast. Of course, it also provides two mechanisms to support persistent data storage. unfortunately, the apsaradb for Redis project does
Installation
Declaration: The following environments are all in ubuntu
Wget http://redis.googlecode.com/files/redis-2.4.4.tar.gzTar zxf redis-2.4.4.tar.gz
After entering the directory, you can directly make it. If your system is 32-bit,
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