Redis download Address, agreed version number The last even-numbered stable version, the odd is an unstable version, I download here is the redis-4.0.8 version of the/usr/local under the new Redis directory, will download the Redis compression
After we install the Redis service, then we look at the basic configuration.
Redis configuration file default location/etc/redis.conf:
Egrep-v "(^#|^$)"/etc/redis.conf
Enter the Redis command line:
Redis-cli
Where 6379 is the listening
Redis InstallationYou need to install the GCC compiler before installing Redis. Then download the Redis from the official website of the extract package, upload to the server specified directory, and then unzip, compile. Specify the installation
The previous company in the development phase of the Redis has been the formal environment, the recent boss let me in a local area network for the development phase of the Redis connection use, build process also encountered some problems,
Description
After the Redis stand-alone deployment is complete, developers need to perform some business operations on the Java Client Connection Redis, the following are some of the basic Java Operational code:
Package com;Import Java.util.HashMap;
When connecting to a remote Redis with Jedis today, throw the connection Timeout exception: Connect timed out. The specific information is as follows:
Exception in thread "main"
Reason: Related to the database configuration parameters of the Yii Redis
Array (
"Framework.vendors.yiiredis.ARedisConnection",
"127.0.0.1",
= 6379,
= 0,
"",
"", "
)
Under Redis, a database is identified by an integer
Redis External Access configuration (BIND is configured correctly) after Redis is deployed, it is found that external access to Redis is not available. Maybe you've looked at me the same night. Many posts, most of which are similar, are set up in
Reprinted from: http://blog.csdn.net/freebird_lb/article/details/7778981
Redis is an in-memory database that supports persistence, which means that Redis often needs to synchronize in-memory data to disk to ensure persistence. Redis supports four
installing Redis services with a regular account
Start Installation
This is done using the 2.8 version of Redis for installation, with security in mind, installation using a regular account, and Redis general account setup scripts I've made into
Micro-blogging function Analysis
Uniqueset class
API
function
Implementation Principle
Uniqueset (client, key)
Sets the client and key for a unique collection.
Is_include (Element)
If Redis is installed with apt-get or yum install, you can stop/start/restart Redis directly with the following command
/etc/init.d/redis-server Stop
/etc/init.d/redis-server start
/etc/init.d/redis-server restartIf you are installing Redis via
The project used here is still the Springboot support for non-relational database NoSQL, except that the difference between Redis server redistemplete and Stringredistemplete on a remote server is used here
In this article we have also tried
list lists common directives
List is a data structure of single value and multiple valueLpush key value [value]
Here the L is left meaning, one or more value values are inserted into the table header of the list key, and if there are multiple
Hash Hash common Operation instruction
The hash keeps the mode of the KV key pair unchanged, but V is a key-value pairHset key field value
Set the value of the Field field in hash table key to value
Hget key Field
Gets the value of field in key
1. Installation Dependencies
Yum install-y wget gcc make tcl
2. Download the source code and install it into the Redis website
https://redis.io/download/
Download the latest versionwget http://download.redis.io/releases/redis-4.0.6.tar.gzTar xzf
Zset ordered set common operation instruction
The ordered set is based on the set, adding a score value, such as the previous set is K v1 v2 v3, now Zset is k score1 v1 score2 v2 score3 v3Zadd key score value [score value]
Adding elements to an
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.