Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The method of exiting redis

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces the method of quitting redis, which is very detailed and has certain reference value. Friends who are interested must finish it!

How do I start and exit redis?

Start redis to move

1. Default configuration startup

Execute the redis-server command to start Redis as configured in the default redis.conf configuration file, as follows:

Because the default configuration cannot be customized. So this method will no longer be used in the production environment.

two。 Running configuration startup

Add the configuration name and value to be modified after the command redis-server (multiple pairs can be set), and the default configuration will be used if it is not set.

For example: redis-server-- port 6389-timeout 3000

Although the configuration can be customized. However, if you modify a large number of configurations, you should save them in the configuration file, which is not recommended.

Configuration file startup

Write the configuration file to the specified redis.conf file, and specify the path to the configuration file after the redis-server command at startup, and redis will start according to the configuration of the configuration file redis.conf. For example: redis-server redis.conf

Exit Redis

After the shutdown command is executed after connecting to the server through redis-cli, the stop redis service operation is performed.

In addition to using the shutdown command to shut down the redis server, you can also use the kill+ process number to shut down the redis service.

Do not use Kill9 to shut down the redis process, so that redis will not persist. In addition, it will cause resources such as buffers not to be closed gracefully, which in extreme cases will result in data loss in AOF and replication.

Shutdown also has a parameter indicating whether to produce persistence files before shutting down the redis service.

Shutdown save | nosave above is all the contents of the method of quitting redis. Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report