Install and run redis practices

Source: Internet
Author: User
Tags download redis

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

Related Article

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.