Redis Summary-Redis installation, redis summary Installation

Source: Internet
Author: User
Tags download redis

Redis Summary-Redis installation, redis summary Installation

Redis needs to be used in recent projects. We will record the installation of Redis and how to use Redis in. NET within the past two days.

 

Redis is a widely used Key/Value memory database. At present, Sina Weibo, Github, StackOverflow, and other large applications use it as the cache, which is similar to Memcached. However, it supports data persistence and completely loses data after power disconnection. It also supports more types. In addition to strings, it also supports lists (linked list), sets (SET), and zsets (sorted set) data types.

 

The official Redis website is http://redis.io /.

 

 1. Install Redis

Redis installation is very simple, and Redis is not dependent on other environments and standard libraries, so it is easy to get started. This may be one of the reasons for its popularity. For the convenience of the test, all tests are performed in windows. Download Redis for Windows.

Redis. windows. conf is the configuration file of redis.

Redis-server.exe server side.

Redis-cli command line client.

Redis-benchmark: Redis performance testing tool to test the read/write performance of Redis in your system and your configuration.

 

 2. Start the service

Enter the following command in the command line: redis-server redis. windows. conf.

You can also save the command as the file startup. bat, which can be started directly next time.

If you are prompted that the redis-server is not an internal command. Add the directory to the environment variable.

 

  3. redis-related configuration

1. port number, for example, 6379

2. Access address bound to the bind instance 127.0.0.1

3. requirepass Password

4. Remember to open this configuration node for maxheap. Otherwise, the redis service cannot be started. For example, maxheap 1024000000

5. timeout: Request timeout

6. logfile: Location of the log file

7. databases: number of databases Enabled

8. dbfilename: Data snapshot file name (only file name, excluding directory)

 

 4. connection test

Enter the following command in the command line: redis-cli-h 127.0.0.1-p 6379

The parameters are host and port respectively. If the password is set, you must add-a 123456,123456 as the logon password. Otherwise, you will be prompted that you do not have the permission to log on to the system.

As shown in.

 

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.