NOSQL Introduction
NoSql is key-value form of storage, unlike traditional databases, which do not necessarily follow some of the basic requirements of traditional databases, such as following the SQL Standard (insert\update\delete\ Select),acid Properties (atomicity consistency isolation persistence), table structure , and so on, these databases have the following characteristics: non-relational , distributed , open- source , horizontally Scalable.
Introduction to Redis
Redis is an open-source , Advanced key-value store. It is commonly referred to as a data structure server because keys can contain strings (string), hashes (hash), linked lists (lists), Collections (set) , and ordered collections (Zset) . These data types support a richer set of operations such as Push/pop/add/remove and intersection and Convergence, and Redis supports sorting in a variety of different ways. In order to ensure efficiency, the database is cached in memory , it can also periodically update the data to disk or write the modified operation to the appended record file (similar to MySQL's Binlog).
For example, the list can be made: stack advanced after the (upper-pass block) barrel | Queue Advanced first out (up and down is a pass) team
Application Scenarios
1. Take the latest N data operation
2. Leaderboard operation, take top n operation
3. Applications that require precise setting of expiration time (key can set expiration time)
4. Counter Application
5. Uniq operation, get all data weight values for a certain period of time
6. Real-time system, anti-spam system
7. Pub/sub building a real-time messaging system
8. Build a queue system (list)
9. Caching
Tar zvxf redis-2.6.13.tar.gz
MV redis-2.6.13/usr/local/webserver/
cd/usr/local/webserver/redis-2.6.13
Make
/usr/local/webserver/redis-2.6.13/src/redis-server/usr/local/webserver/redis-2.6.13/redis.conf
Vi/usr/local/webserver/redis-2.6.13/redis.conf
Modify Daemonize to Yes start mode is run in the background
Enter REDIS/USR/LOCAL/WEBSERVER/REDIS-2.6.13/SRC/REDIS-CLI
Redis Learning a Redis introduction and installation Deployment