This article original from the http://blog.csdn.net/voipmaker reprint indicate the source.
Redis is a member of the nosql database family, similar to memcached,
It is a high-performance memory-based Key-value storage system. I will gradually record the process of learning and using redis as notes.
(1) Compilation and installation:
Official website download redis-3.0.0-beta8.tar.gz
Decompress the source code directory:
CD/opt/redis/redis-3.0.0-beta8
Make
Make install
The Installation Process of redis is very simple. After downloading the source code, directly make and generate redis-server and redis-CLI in the src directory.
Redis-server is the generated redis executable program, redis-CLI is login redis-server console tool, used to interact with redis-server, src directory also has a redis-trib.rb, this is a script used by users to build redis clusters. It is available at the beginning of redis3.0. redis-Sentinel is a highly available tool for redis and can implement ha.
Make install will copy these executable programs to the/usr/local/bin directory.
(2) Run
Redis Startup Mode
Source code src directory execution
./Redis-server ../redis. conf
To start the redis service through the configuration file, you must specify the path of the configuration file.
The default configuration file is in the root directory of the source code. redis. conf is the configuration file of redis. It defines several parameters, specifying the listening port, IP address, whether to enable cluster mode, persistence mode, and so on.
As an experiment, open the log and modify the loglevel option of redis. conf. The default value is verbose and is set to debug. You can also print logs to files and modify the logfile parameter to specify the log file path.
A single machine can start multiple redis-server instances. You only need to change the port parameters in redis. conf.
Install and run redis practices