Simple and crude introduce Redis;
Here are some from Wikipedia:
Redis is an open source ( the BSD license), the data structure stored in the memory system that can be used as a database , cache and messaging middleware . It supports multiple types of data structures, such as strings ( strings ), hashes ( hashes ), list ( Lists ), the set ( sets ), ordered collection ( sorted sets ) and range queries, bitmaps , hyperloglogs and geospatial ( Geospatial ) index radius inquiry. Redis built-in copy ( Replication ), LUA scripting ( Lua Scripting ), the LRU -driven events ( the LRU eviction ), Transactions ( Transactions ) and different levels of disk persistence ( Persistence ), and by Redis Sentinel ( Sentinel ) and automatic partitioning ( Cluster provides high availability () High dostępność ).
Closer to home:
1, environment preparation:
CentOS system: CentOS assumed herein has been installed; not installed can be referred to: https://blog.51cto.com/13886506/2441326
Redis installation package: http://download.redis.io/releases/redis-5.0.5.tar.gz
Download the latest version to view specific Quguan network: https://redis.io/download
2, download the installation package files to your CentOS server, personal use of the tool is FinalShell. Can http://www.hostbuf.com/ download.
This software can simply drag and drop files to the corresponding directory.
3, to decompress compressed
Folder directory by cd command to go to the folder where the archive,
In the terminal input tar -xvf redis-5.0.4.tar.gz transport, waiting for the end of the run decompressor
4 files, because the files after decompression can not run directly on Linux, so to compile decompression
In a make input terminal (after extracting the current folder for the file directory)
The figure below illustrates appears when compiled:
5, and then start the installation
Enter type make install
6, Redis start checking
Enter input redis-server
Normally there will be the following figure:
7, modify the configuration file redis
Enter input vim redis.conf
Redis.conf files by entering the i to enter edit mode
7.1, disable IP Binding (probably in line 69)
7.2, turn off protected mode (about 88 lines)
7.3, open backstage start (probably in 136 rows)
Save and exit: press ESC: wq Enter
8. Restart input: Redis-Server redis.conf
9, entering client
cli-Redis [ -p 6379 ] can be written in brackets do not write, do not write the default port
10, quit the client (the following three ways are available)
ctrl+c exit quit
11, closed redis
redis-cli [-p 6379] shutdown (not within the write bracket)
Attachment:
Kill the process
[root@localhost redis]# ps -ef |grep redis
root 11446 1 0 19:02 ? 00:00:00 redis-server *:6379
root 11452 6743 0 7:03 p.m. pts / 1 0:00:00 grip Redis
[root@localhost redis]# kill -9 11446
[root@localhost redis]#