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

How to make redis run in the background

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

Share

Shulou(Shulou.com)05/31 Report--

This article will explain in detail how to make redis run in the background. Xiaobian thinks it is quite practical, so share it with you for reference. I hope you can gain something after reading this article.

Introduction:

After we install redis, if we run the redis-server command, the following image will appear.

But there is no way to do anything under this tab, because after using Ctrl+c at this time, it becomes like this.

Then it closes, so what if I want redis to start in the background?

After installing redis, we can find a file called redis.conf, which is the location of the redis configuration file, as shown in the figure:

Use the vim command to open the file, as shown:

In fact, good English students can read this configuration document, benefit a lot, up is redis how to call this configuration document, and gives an example, should be able to understand, has given an example.

The following is a description of the unit conversion.

Looking down, as shown in the picture:

As you can see, other configuration files can be loaded via include.

Looking down, as shown in the picture:

Here general is the general configuration, see the first configuration item, daemonize, this means a continuous running program, I do not know what the specific principle, but only this means that it can be started in the background configuration.

According to the instructions, set daemonize to yes, as shown in the figure:

Save, exit, and start redis. Of course, when starting, pay attention to using the configuration file just configured, as shown in the figure:

After startup, there is no big deal like before, because we use background startup to confirm whether to start, you can use ps -ef| grep redis command, as shown in the figure:

This way redis can be started in the background.

About "how to make redis run in the background" this article is shared here, I hope the above content can be of some help to everyone, so that you can learn more knowledge, if you think the article is good, please share it for more people to see.

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