Phenomenon: In the pagoda is clearly installed Redis, can run Redis related programs or prompts:
ERR: System not supported: Redis
Reason: View PHP extension library inside there is no redis.so, but Redis.so is Redis compiled out of it, finally
the difference between Redis and memcached
The difference between Redis and memcached is simple, and most will get the following view:1 Redis not only supports simple k/v types of data, but also provides storage of data structures such as
1, download, compile, install
Https://redis.io/download
wget xxxxx 2, set up service automatic background start (1), copy initialization scriptFirst, the Utils/redis_init_script file is copied to the/ETC/INIT.D, and the REDISD is easily named.
# Redis-sentinel's official website address: Http://redis.io/topics/sentinel # Note: Redis-sentinel website is not a stable version. Personally feel this is much better than Keepalived+redis to switch. Configuration environment: os:centos6.1 x86 *
Description
After the Redis cluster is built, for subsequent operations and in-use processes need to add, delete, modify, and so on to the service node nodes in the incoming cluster, the following records the processing of node in the specific
prior to the installation of Redis, for how to use, is not particularly clear, so Baidu down, at the same time combined with their own common commands, did the next integration,
The following are some of the commonly used commands;
1 Redis data
1 redis Master service configuration 1.1 Overview
Redis's master-slave replication feature is very powerful, a master can have multiple slave, and a slave can have more than slave, so continue to form a powerful multi-level server cluster
Installation
System: centos6.4
redis Download: http://www.redis.cn/download.html
Redis installation steps:
upload source package to/lamp
decompression: TAR-ZXVF redis.tar.gz
CD Redis
make/compile source, first installed Linux system This step may be
1, the system integrates the Redis service. Redis configuration in the properties file:
redis.host=127.0.0.1
redis.port=6379
redis.default.db=0
redis.timeout=100000
redis.maxactive=
redis.maxidle=100
Reprint: http://ju.outofmemory.cn/entry/330999
There are 3 commands for clearing data in Redis, namely: Flushall, Flushdb, SCRIPT FLUSH. Flushall [ASYNC]
Indicates that all data in all db is deleted. The default is a synchronous operation, and the
Start Redis ServiceRedis-server or Redis-server redis.conf
Redis-server redis.conf 1>log.log 2>errlog.log
1 for standard output, 2 for error output randomly booting Redis as a Linux serviceVim/etc/rc.local, add
Six features of Redis
L Strings
L HASHS
L Lists
L Sets
L Sorted Sets
L PUB/SUB Application Scenarios for Redis features Strings
The Strings data structure is a simple key-value type, and value is not only a string, it can also be a number. Common
Integration with spring
What jar packages I need.
org.springframework.data
spring-data-redis
redis.clients
jedis
How to configure the spring configuration file.
General, only need to configure redistemplate or
Shiro Cache to Redis management
tags (space delimited): Shiro Redis
Objective:
The following methods are only used by single-use Redis
I. Importing jars for Shiro and Redis
Jedis-2.7.3.jar
shiro-core-1.2.3.jar
shiro-ehcache-1.2.3.jar
Redis Hash is a string-type field and value mapping table, and hash is particularly useful for storing objects.
Each hash in a Redis can store 2^32-1 key-value pairs (more than 4 billion).
Example
127.0.0.1:6379> hmset runoobkey name "Redis
The recent need to design a distributed scheduled task, in theory, Quartz has provided a complete set of distributed scheduled tasks of the solution, but because the system currently has a JMS cluster and Redis Sentinel cluster, if you want to the
The redis hash is a string-type field and a mapping table of value. A key can correspond to multiple fields, and a field corresponds to a value. Storing an object as a hash type can save memory more than storing each field as a string type. When
Redis master-slave replication process
When slave is configured, slave establishes a connection with master and then sends the Sync command. Whether it is the first connection or reconnection, master initiates a background process, saves the DB
1. Introduction to the database: Currently, there are two main types of databases: relational database (RDBMS), non-relational database (NoSQL);(1). Relational database RDBMS: It is a database based on the relational model, which uses mathematical
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