Basic knowledge of Redis (i)

Source: Internet
Author: User

Redis is an open-source high-performance key-value pair database that adapts to the storage requirements of different scenarios by providing multiple key-value data types, and with many high-level interfaces that enable it to perform different roles such as caching, queuing systems, and so on.

The latest version of Redis is 3.2.1, which is downloaded from the official website and then unzipped and installed:

$ wget http://download.redis.io/releases/redis-3.2.1.tar.gz
$ tar xzf redis-3.2.1.tar.gz
$ CD redis-3.2.1
$ make

After the installation is successful, Redis is started, there are two ways to start, the first is to run Redis-server directly to start Redis, very simple, Redis server uses 6379 port by default. The second way to start is to start Redis with the Init script, which enables Redis to be started in a Linux system with the init script, enabling Redis to run automatically with the system, and it is recommended to run Redis in a production environment.

Stop Redis: Considering that Redis may be synchronizing the in-memory data to the hard disk, forcing the Redis process to terminate may result in data loss. The proper way to stop Redis should be to send the shutdown command to Redis by:

$ redis-cli SHUTDOWN

When Redis receives the shutdown command, it disconnects all client connections, then performs persistence based on the configuration and finally completes the exit.


Basic knowledge of Redis (i)

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.