1 Redis Introduction and Installation
What is 1.1 Redis?
REmote DIctionary Server (Redis) is a Key-value storage system written by Salvatore Sanfilippo.
First you need to understand some of the data structures of Redis, including lists, sets, ordered sets, and hashes.
Redis is often referred to as a data structure server (data structure server). The key value for Redis can include a string (strings) type, and it also includes data types such as hashes (hashes), lists (lists), collections (sets), and ordered collections (sorted sets).
For these data types, you can perform atomic operations. For example: attaching an operation to a string (append), incrementing a value in a hash, adding an element to a list, calculating the intersection of a set, a set and a difference set, and so on.
Advantages of 1.2 Redis
Very high performance –redis can support more than 100k+ per second read and write frequency.
Rich data types –redis support binary case Strings, Lists, hashes, sets and Ordered sets data type operations.
All atomic –redis operations are atomic, and Redis supports atomic execution of several operations.
Rich features –redis also supports publish/subscribe, notifications, key expiration, and more.
2 Redis Installation
Set Root password
$ sudo passwd (enter Shiyanlou user password and set root password) $ SU (enter root password, enter root permission) $ cd$ wget http://labfile.oss.aliyuncs.com/files0422/ redis-2.8.9.tar.gz$ tar xvfz redis-2.8.9.tar.gz$ cd redis-2.8.9$ make$ make install$ make test
After the Redis installation is complete, note some important files that can be viewed with the LS command. Server: Src/redis-server, client: src/redis-cls, default profile: redis.conf
The executable file is placed in the $path environment directory, which makes it easy to execute the program at a later time without entering the full path.
$ CP redis-server/usr/local/bin/$ CP redis-cli/usr/local/bin/
Start Redis Server
$ redis-server
View Redis
$ PS-EF | grep Redis
View Redit Service Status
# check Redis server Status by starting command $ netstat-nlt|grep 6379
Start Redis-client
$ su (enter root password, enter root directory) $ cd$ redis-cli
Reference documents
Http://www.linuxidc.com/Linux/2014-05/101544p2.htm
Introduction and installation of Redis