As the company needed to use the Redis key database, it took a long time today to install him up. The specific installation method is as follows:First download the Reids compression pack reidis-2.4.15.tar.gz,Then type:# Tar XF
1. Transactions 1.1 multi and exec commands Send the multi command to declare the transaction; execute the transaction through Exec Redis does not support transaction rollback Redis 127.0.0.1: 6379> set key 1 okredis 127.0.0.1: 6379> set key 2
There are two methods to clear redis data:
Manual clearing: Specifies the key to be cleared. You can clear the key by using the DELETE command.
Automatic cleanup: use the data expiration Policy provided by redis
Redis data
Operation-related command connection Quit: disconnect)Auth: Simple Password AuthenticationPersistenceSave: synchronize and save data to the disk.Bgsave: asynchronously saves data to the disk.Lastsave: returns the Unix timestamp from which data is
tag: CTI time C information of I/O file data 1. when a GB file is read and written to redis, The Machine resources are insufficient and the process is killed by the system. redis string theory supports 1 GB 2. scenario: the VM function has been
Redis is a key-value storage system. Similar to memcached, memcached supports more storage value types, including string, list, set, and zset) and hash (hash type ). These data types support push/pop, Add/Remove, Intersection Set and difference set,
The linked list is a widely used data structure in redis. In many cases, the underlying structure of the list structure is implemented using the linked list.
The linked list is defined in the header file adlist. H. It is a common two-way linked
Server version RedHat 6.4-64
First, solve the permission problem:
1. Ssh-keygen # if it is a root user, the default directory generated is id_rsa (Public Key) id_rsa.pub (Private Key), which is the two files under/root/. Ssh)
2. CD/root/. Ssh/&
1. Introduction
Redis is a key-value storage system. Similar to memcached, memcached supports more storage value types, including string, list, set, and zset) and hash (hash type ). These data types support push/pop, Add/Remove, Intersection Set and
The Learning target is 2 hours a day and 13 days for you to learn redis.
This course is intended for beginners of redis and even students who have never heard of anything about redis. The course details what redis is and why redis is used. Combined
Current redis version
#redis-cli -vredis-cli 2.6.4Multi, exec, discard, and watch are the foundation of redis transactions.
1. multiThe command is used to start a transaction. It always returns OK.
After multi is executed, the client can
Redis is a storage service that supports structures such as K-V and data can be implemented (memcache data is memory data and cannot be implemented)
Let's enter the redis world to find out.
Enter redis through the command line:
Use PS aux | grep
By default, our PHP stores session data in the form of files. Therefore, each read/write session information needs to access the hard disk.In order to solve the domain name problem of session information, that is, to achieve a single login at the
View the current path first
# pwdHere I am/root and go to the official redis website to find the latest redis tar package. Then I can start the operation.
# wget http://download.redis.io/releases/redis-2.8.13.tar.gz# tar zxf redis-2.8.13.tar.gz# cd
1. Download the source code, decompress it, and compile the source code.
$ wget http://download.redis.io/releases/redis-2.8.3.tar.gz$ tar xzf redis-2.8.3.tar.gz$ cd redis-2.8.3$ make
2. After compilation, there are four executable files in the src
There are two types of redis startup: development environment and production environment.
I. Development Environment
1. CD redis-2.8.13/src
2../redis-Server start the server
3.../redis-cli start the client
Ii. Production Environment (started
Setup and installation of redis Server
Run the following command on the command line:
$ wget http://download.redis.io/releases/redis-2.8.13.tar.gz$ tar xzf redis-2.8.13.tar.gz$ cd redis-2.8.13$ make
After compilation, six files are generated:redis-
1 Master/Slave server startup
Use the default redis. conf configuration file to start the master server, port 6379.
[7304] 29 Aug 09:57:26-0 clients connected (0 slaves), 673996 bytes in use
[7304] 29 Aug 09:57:31-db 0: 15 keys (0 volatile) in 16
Latest Version: 2.8.13
Installing redis in Linux is very simple. The specific steps are as follows (the official website has instructions ):
1. Download the source code, decompress it, and compile the source code.
$ Wget
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.