1. Create script directory scripts, place script in this directoryThe script is as follows:
#!/bin/bashRedispath= "/usr/local/bin/redis-cli"Host= "127.0.0.1"Port= "6379"Redis_pa= "$REDISPATH-H $HOST-P $PORT Info"if [[$# = 1]];thenCase is
After using the Redis speed up the result is the complexity of the operation of data, pagination has a feeling of the pants fart. But there is no other way. The code is as follows
The code is as follows
Copy Code
The following sample code includes 2 demos:
One is an example of how to add, modify, add, reduce, and delete string type data;
The other is an example of how to add, modify, add, and delete sorted set type data.
More Redis operation commands can
Master ip:192.168.240.78Backup ip:192.168.240.79Virtual ip:192.168.240.89Slave ip:192.168.240.80Slave2 ip:192.168.240.81Features to implement:1. When master and slave are operating normally, Master is responsible for writing, backup is responsible
Install Redis
(1) Download Redis
wget http://redis.googlecode.com/files/redis-2.2.11.tar.gz
tar xzvf redis-2.2.11.tar.gz
(2) Compile and install Redis
Make && make install
(3) Copy and modify the configuration file
The example of this article for everyone to share the Windows Redis installation method for your reference, the specific content as follows
1, first of all, Redis official support Linux system, I do not say here, need to refer to:
Reference:
Http://redis.io/topics/cluster-tutorial (mainly creating a Redis cluster using the Create-cluster script part)
https://ruby.taobao.org/
Install an unfamiliar software to see the Install,readme before, this is the custom, production
Brief introduction
How many times have you found yourself stuck in a Web application without performance after months of development and countless efforts? How many times have you wondered if you can't communicate fast and fast to ordinary users,
Redis is currently the NoSQL field of the popular fried chicken, it is like a Swiss Army knife, small, sharp, practical, especially suitable for the use of traditional relational database difficult to solve problems. Intend to write a series of
There was an error running Redis today with the following error message:(Error) Misconf Redis is configured to save the RDB snapshots, but was currently not able to persist on disk. Commands that may modify the data set is disabled. Please check
I. What is RedisRedis is a key-value storage system. Similar to memcached, it supports storing more value types, including string (string), list (linked list), set (set), and Zset (ordered collection)More introduction will not copy, Direct crossing
Python has a lot of basic operations on redis, and here are some of the things that people find interesting: 1.redis transactional operations and watch optimistic locking, followed by a description of how to use Redis asynchronously under 2.tornado
Session, Chinese is often translated into a conversation, its original meaning refers to the beginning and end of a series of actions/messages, such as the phone from the pick up the phone to dial to hang up the phone in the middle of a series of
1. Who decided to take the Redis cache? Of course it's mybatis.MyBatis in the default implementation of data deletion and modification function, here to use the cache AhAnd it's mybatis. This ORM framework uses a caching mechanism, and MyBatis has a
Redis can store mappings that can store keys between 5 different data structure types.The five structure types are: string (string), list, set (set), hash (hash), Zset (ordered collection).1. String type The string data structure is a simple
Redis Master-Slave:Role:Enables real-time backup of data for Redis read-write separation and Redis high availabilityMaster-Slave synchronization principle:One master one from the environment:Environment: 2 Redis, one master one slave1,master wait
When building applications, we often need to record the user's every move, and one of the more important things is to record the users online.This article describes four scenarios for using Redis to record online users, although they can count the
1. Install redis on the vps host① I use the LNMP package, which comes with redis. Execute./redis. sh to automatically install and add it to self-start② Install redis-server separately# Apt-get install redis-serverStart redis-server and add the
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